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


C# MemberTypes类代码示例

本文整理汇总了C#中MemberTypes的典型用法代码示例。如果您正苦于以下问题:C# MemberTypes类的具体用法?C# MemberTypes怎么用?C# MemberTypes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: TypeValueInfo

        public Module Module;                // ex RunCode_00002.dll

        public TypeValueInfo(Type sourceType, MemberInfo memberInfo)
        {
            SourceType = sourceType;
            Name = memberInfo.Name;
            TreeName = memberInfo.Name;
            ParentName = null;

            Type valueType = memberInfo.zGetValueType();
            Type enumerableType = null;
            if (valueType != typeof(string))
                enumerableType = zReflection.GetEnumerableType(valueType);
            if (enumerableType != null)
            {
                ValueType = enumerableType;
                IsEnumerable = true;
            }
            else
            {
                ValueType = valueType;
                IsEnumerable = false;
            }

            IsValueType = TypeReflection.IsValueType(ValueType);
            DeclaringType = memberInfo.DeclaringType;
            ReflectedType = memberInfo.ReflectedType;
            MemberTypes = memberInfo.MemberType;
            MetadataToken = memberInfo.MetadataToken;
            Module = memberInfo.Module;
        }
开发者ID:labeuze,项目名称:source,代码行数:31,代码来源:TypeReflection.cs

示例2: WiredToAttribute

        public WiredToAttribute(MemberTypes memberType, string name, Type typeWiredTo)
        {
            WiredMemberType = memberType;
            WiredMemberName = name;

            TypeWiredTo = typeWiredTo;
        }
开发者ID:HelloKitty,项目名称:Testity,代码行数:7,代码来源:WiredToAttribute.cs

示例3: MapCallInfo

 public MapCallInfo(Type targetType, Type[] genericTypes, Flags bindingFlags, MemberTypes memberTypes, string name, Type[] parameterTypes, MemberInfo memberInfo, bool isReadOperation, Type sourceType, MemberTypes sourceMemberTypes, MemberTypes targetMemberTypes, string[] names) : base(targetType, genericTypes, bindingFlags, memberTypes, name, parameterTypes, memberInfo, isReadOperation)
 {
     SourceType = sourceType;
     SourceMemberTypes = sourceMemberTypes;
     TargetMemberTypes = targetMemberTypes;
     Names = names;
 }
开发者ID:devworker55,项目名称:Mammatus,代码行数:7,代码来源:MapCallInfo.cs

示例4: ThinMember

        public ThinMember(ThinType declaringType, string memberName, string returnType, MemberTypes memberType,
                          IncludeStatus includeStatus, ITypeDefinitionMember memberNode, VisibilityOverride visibility)

            : this(declaringType, memberName, returnType, memberType,
                   includeStatus, memberNode, visibility, SecurityTransparencyStatus.Transparent)
        {
        }
开发者ID:jango2015,项目名称:buildtools,代码行数:7,代码来源:Thinner.cs

示例5: PermissionMember

 public PermissionMember (MemberTypes member_type, BaseTypeRef type_ref, string name, object value)
 {
         this.member_type = member_type;
         this.type_ref = type_ref;
         this.name = name;
         this.value = value;
 }
开发者ID:nobled,项目名称:mono,代码行数:7,代码来源:PermissionMember.cs

示例6: MemberInfoSerializationHolder

	// Constructor.
	public MemberInfoSerializationHolder(SerializationInfo info,
									StreamingContext context)
			{
				if(info == null)
				{
					throw new ArgumentNullException("info");
				}
				memberType = (MemberTypes)(info.GetInt32("MemberType"));
				name = info.GetString("Name");
				signature = info.GetString("Signature");
				String assemblyName = info.GetString("AssemblyName");
				String className = info.GetString("ClassName");
				if(assemblyName == null || className == null)
				{
					throw new SerializationException
						(_("Serialize_StateMissing"));
				}
				Assembly assembly = FormatterServices.GetAssemblyByName
					(assemblyName);
				if(assembly == null)
				{
					throw new SerializationException
						(_("Serialize_StateMissing"));
				}
				containingType = FormatterServices.GetTypeFromAssembly
					(assembly, className);
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:28,代码来源:MemberInfoSerializationHolder.cs

示例7: SetMainMember

 public void SetMainMember(IField field)
 {
     this.Member = field;
     this.MemberType = MemberTypes.Field;
     this.SubMemberType = this.MemberType;
     this.SubMember = this.Member;
 }
开发者ID:afrog33k,项目名称:csnative,代码行数:7,代码来源:MemberLocationInfo.cs

示例8: MemberInfoSerializationHolder

		MemberInfoSerializationHolder(SerializationInfo info, StreamingContext ctx)
		{
			string assemblyName;
			string typeName;

			assemblyName = info.GetString("AssemblyName");
			typeName = info.GetString("ClassName");

			_memberName = info.GetString("Name");
			_memberSignature = info.GetString("Signature");
			_memberType = (MemberTypes) info.GetInt32("MemberType");

#if NET_2_0
			try {
				_genericArguments = null;

				// FIXME: this doesn't work at present. It seems that
				// ObjectManager doesn't cope with nested IObjectReferences.
				// _genericArguments = (Type[]) info.GetValue("GenericArguments", typeof(Type[]));
			} catch (SerializationException) {
				// expected (old NET_1_0 protocol)
			}
#endif
			// Load type
			Assembly asm = Assembly.Load(assemblyName);

			_reflectedType = asm.GetType(typeName, true, true);
		}
开发者ID:runefs,项目名称:Marvin,代码行数:28,代码来源:MemberInfoSerializationHolder.cs

示例9: GetSerializationInfo

        private void GetSerializationInfo(SerializationInfo info, string name, Type reflectedClass, string signature, MemberTypes type, Type[] genericArguments)
        {
            if (info == null)
            {
                throw new ArgumentNullException("info");
            }

            AssemblyName asmname = reflectedClass.Assembly.GetName();

            asmname.Version = new Version(_version, 0, 0, 0);

            string fullName = asmname.ToString();
                               
            string str2 = reflectedClass.FullName;
            Type t = typeof(int).Assembly.GetType("System.Reflection.MemberInfoSerializationHolder");

            info.SetType(t);

            for (int i = 0; i < genericArguments.Length; ++i)
            {
                genericArguments[i] = new FakeType(genericArguments[i], _version);
            }

            // This is here to prevent a de-serialization bug
            if (genericArguments.Length > 0)
            {
                info.AddValue("DUMMY", genericArguments[0]);
            }
            info.AddValue("GenericArguments", genericArguments, typeof(Type[]));
            info.AddValue("Name", name, typeof(string));
            info.AddValue("AssemblyName", fullName, typeof(string));
            info.AddValue("ClassName", str2, typeof(string));
            info.AddValue("Signature", signature, typeof(string));
            info.AddValue("MemberType", (int)type);
        }
开发者ID:matthiaskaiser,项目名称:ExploitRemotingService,代码行数:35,代码来源:FakeMethod.cs

示例10: NodeInfo

 public NodeInfo(Type type, string name, MemberTypes mtype, ParameterInfo[] parameters)
 {
     this.NodeType = type;
     this.Name = name;
     this.MemberType = mtype;
     this.Parameters = parameters;
 }
开发者ID:nguyenhuuhuy,项目名称:mygeneration,代码行数:7,代码来源:AutoCompleteHelper.cs

示例11: GetSerializationInfo

        public static void GetSerializationInfo(
            SerializationInfo info,
            String name,
            RuntimeType reflectedClass,
            String signature,
            String signature2,
            MemberTypes type,
            Type[] genericArguments)
        {
            if (info == null)
                throw new ArgumentNullException(nameof(info));
            Contract.EndContractBlock();

            String assemblyName = reflectedClass.Module.Assembly.FullName;
            String typeName = reflectedClass.FullName;

            info.SetType(typeof(MemberInfoSerializationHolder));
            info.AddValue("Name", name, typeof(String));
            info.AddValue("AssemblyName", assemblyName, typeof(String));
            info.AddValue("ClassName", typeName, typeof(String));
            info.AddValue("Signature", signature, typeof(String));
            info.AddValue("Signature2", signature2, typeof(String));
            info.AddValue("MemberType", (int)type);
            info.AddValue("GenericArguments", genericArguments, typeof(Type[]));
        }
开发者ID:kouvel,项目名称:coreclr,代码行数:25,代码来源:MemberInfoSerializationHolder.cs

示例12: Error_MemberLookupFailed

			protected override Expression Error_MemberLookupFailed (Type container_type, Type qualifier_type,
				Type queried_type, string name, string class_name, MemberTypes mt, BindingFlags bf)
			{
				Report.Error (1935, loc, "An implementation of `{0}' query expression pattern could not be found. " +
					"Are you missing `System.Linq' using directive or `System.Core.dll' assembly reference?",
					name);
				return null;
			}
开发者ID:lewurm,项目名称:benchmarker,代码行数:8,代码来源:linq.cs

示例13: FindMember

 private static MemberInfo FindMember(Type t, string name, MemberTypes types)
 {
     return t
         .FindMembers(types, BindingFlags.Instance | BindingFlags.Public, Type.FilterNameIgnoreCase, name)
         .OrderByDescending(x => x.Name == name)
         .ThenByDescending(x => x.MemberType == MemberTypes.Property)
         .FirstOrDefault();
 }
开发者ID:MetaMicrocode,项目名称:Veil,代码行数:8,代码来源:HandlebarsExpressionParser.cs

示例14: JSPredefinedField

 internal JSPredefinedField(string name, MemberTypes memberType, GlobalObjectInstance globalObject)
     : base(name, 0, null)
 {
     m_memberType = memberType;
     m_globalObject = globalObject;
     // predefined fields cannot be crunched
     CanCrunch = false;
 }
开发者ID:nuxleus,项目名称:ajaxmin,代码行数:8,代码来源:jspredefinedfield.cs

示例15: AbstractEmitter

 protected AbstractEmitter(Type targetType, BindingFlags bindingFlags, MemberTypes memberTypes, Type[] parameterTypes, MemberInfo memberInfo)
 {
     _targetType = targetType;
     _bindingFlags = bindingFlags;
     _memberTypes = memberTypes;
     _parameterTypes = parameterTypes;
     _memberInfo = memberInfo;
 }
开发者ID:mstaessen,项目名称:fluorinefx,代码行数:8,代码来源:AbstractEmitter.cs


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