當前位置: 首頁>>代碼示例>>C#>>正文


C# TypeReference.IsTypeSpecification方法代碼示例

本文整理匯總了C#中Mono.Cecil.TypeReference.IsTypeSpecification方法的典型用法代碼示例。如果您正苦於以下問題:C# TypeReference.IsTypeSpecification方法的具體用法?C# TypeReference.IsTypeSpecification怎麽用?C# TypeReference.IsTypeSpecification使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Mono.Cecil.TypeReference的用法示例。


在下文中一共展示了TypeReference.IsTypeSpecification方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: AreSame

        static bool AreSame(TypeReference a, TypeReference b)
        {
            if (a.etype != b.etype)
                return false;

            if (a.IsGenericParameter)
                return AreSame ((GenericParameter) a, (GenericParameter) b);

            if (a.IsTypeSpecification ())
                return AreSame ((TypeSpecification) a, (TypeSpecification) b);

            return a.FullName == b.FullName;
        }
開發者ID:peterwald,項目名稱:cecil,代碼行數:13,代碼來源:MetadataResolver.cs

示例2: ImportType

		public TypeReference ImportType (TypeReference type, IGenericContext context)
		{
			if (type.IsTypeSpecification ())
				return ImportTypeSpecification (type, context);

			var reference = new TypeReference (
				type.Namespace,
				type.Name,
				module,
				ImportScope (type.Scope),
				type.IsValueType);

			MetadataSystem.TryProcessPrimitiveType (reference);

			if (type.IsNested)
				reference.DeclaringType = ImportType (type.DeclaringType, context);

			if (type.HasGenericParameters)
				ImportGenericParameters (reference, type);

			return reference;
		}
開發者ID:jeroldhaas,項目名稱:ContinuousTests,代碼行數:22,代碼來源:Import.cs

示例3: Import

        private TypeReference Import(TypeReference tdef, ModuleDefinition module, IInjector injector)
        {
            if (tdef.IsTypeSpecification())
                throw new NotImplementedException();

            var reference = new TypeReference(
                tdef.Namespace,
                tdef.Name,
                module,
                module.ImportScope(injector.MapMetadataScope(tdef.Scope)),
                tdef.IsValueType);

            MetadataSystem.TryProcessPrimitiveTypeReference(reference);

            if (tdef.IsNested)
                reference.DeclaringType = Import(tdef.DeclaringType, module, injector);

            if (tdef.HasGenericParameters)
                CecilHelpers.ImportGenericParameters(reference, tdef);

            return reference;
        }
開發者ID:MarkusSintonen,項目名稱:MNetInjector,代碼行數:22,代碼來源:TypeInjecteeBase.cs

示例4: AreSame

		static bool AreSame (TypeReference a, TypeReference b)
		{
			if (ReferenceEquals (a, b))
				return true;

			if (a == null || b == null)
				return false;

			if (a.etype != b.etype)
				return false;

			if (a.IsGenericParameter)
				return AreSame ((GenericParameter) a, (GenericParameter) b);

			if (a.IsTypeSpecification ())
				return AreSame ((TypeSpecification) a, (TypeSpecification) b);

			if (a.Name != b.Name || a.Namespace != b.Namespace)
				return false;

			//TODO: check scope

			return AreSame (a.DeclaringType, b.DeclaringType);
		}
開發者ID:lousiCC,項目名稱:cecil,代碼行數:24,代碼來源:MetadataResolver.cs

示例5: ImportType

        internal TypeReference ImportType(TypeReference type, ImportGenericContext context, 
            IImportMapper mapper)
        {
            if (type.IsTypeSpecification())
                return ImportTypeSpecification(type, context, mapper);

            var mapped = mapper.MapType(type);
            if (mapped == null)
                mapped = type;

            var reference = new TypeReference(
                mapped.Namespace,
                mapped.Name,
                module,
                ImportScope(mapper.MapMetadataScope(type.Scope)),
                mapped.IsValueType);

            MetadataSystem.TryProcessPrimitiveTypeReference(reference);

            if (mapped.IsNested)
                reference.DeclaringType = ImportType(mapped.DeclaringType, context, mapper);

            if (mapped.HasGenericParameters)
                ImportGenericParameters(reference, mapped);

            return reference;
        }
開發者ID:MarkusSintonen,項目名稱:MNetInjector,代碼行數:27,代碼來源:Import.cs


注:本文中的Mono.Cecil.TypeReference.IsTypeSpecification方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。