当前位置: 首页>>代码示例>>C#>>正文


C# TypeDefinition.IsNSObject方法代码示例

本文整理汇总了C#中Mono.Cecil.TypeDefinition.IsNSObject方法的典型用法代码示例。如果您正苦于以下问题:C# TypeDefinition.IsNSObject方法的具体用法?C# TypeDefinition.IsNSObject怎么用?C# TypeDefinition.IsNSObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mono.Cecil.TypeDefinition的用法示例。


在下文中一共展示了TypeDefinition.IsNSObject方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ProcessType

		public override void ProcessType (TypeDefinition type)
		{
			if (!type.IsNSObject () || !type.IsNativeObject ())
				return;

			base.ProcessType (type);
		}
开发者ID:Zman0169,项目名称:mono,代码行数:7,代码来源:MarkNSObjects.cs

示例2: ProcessType

        public override void ProcessType(TypeDefinition type)
        {
            if (ProductAssembly == null)
                ProductAssembly = (Profile.Current as BaseProfile).ProductAssembly;

            bool nsobject = type.IsNSObject ();
            if (!nsobject && !type.IsNativeObject ())
                return;

            if (!IsProductType (type)) {
                // we need to annotate the parent type(s) of a nested type
                // otherwise the sweeper will not keep the parents (nor the childs)
                if (type.IsNested) {
                    var parent = type.DeclaringType;
                    while (parent != null) {
                        Annotations.Mark (parent);
                        parent = parent.DeclaringType;
                    }
                }
                Annotations.Mark (type);
                Annotations.SetPreserve (type, TypePreserve.All);
            } else {
                PreserveIntPtrConstructor (type);
                if (nsobject)
                    PreserveExportedMethods (type);
            }
        }
开发者ID:yudhitech,项目名称:xamarin-macios,代码行数:27,代码来源:MarkNSObjects.cs

示例3: ProcessType

        public override void ProcessType(TypeDefinition type)
        {
            // if 'type' inherits from NSObject inside an assembly that has [GeneratedCode]
            // or for static types used for optional members (using extensions methods), they can be optimized too
            bool extensions = type.IsSealed && type.IsAbstract && type.Name.EndsWith ("_Extensions", StringComparison.Ordinal);
            if (!HasGeneratedCode && (type.IsNSObject () || !extensions))
                return;

            if (type.HasMethods)
                ProcessMethods (type.Methods, extensions);
        }
开发者ID:yudhitech,项目名称:xamarin-macios,代码行数:11,代码来源:CoreOptimizeGeneratedCode.cs

示例4: ProcessType

 void ProcessType(TypeDefinition type)
 {
     if (type.IsNSObject ()) {
         ProcessNSObject (type);
     } else if (type.HasNestedTypes) {
         foreach (var nested in type.NestedTypes)
             ProcessType (nested);
     }
 }
开发者ID:yudhitech,项目名称:xamarin-macios,代码行数:9,代码来源:RemoveSelectors.cs

示例5: IsNSObject

 // called once for each 'type' so it's a nice place to cache the result
 // and ensure later steps re-use the same, pre-computed, result
 static bool IsNSObject(TypeDefinition type)
 {
     if (!type.IsNSObject ())
         return false;
     cached_isnsobject.Add (type);
     return true;
 }
开发者ID:yudhitech,项目名称:xamarin-macios,代码行数:9,代码来源:MonoTouchTypeMap.cs


注:本文中的Mono.Cecil.TypeDefinition.IsNSObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。