當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。