1 write to EnumType
System.ComponentModel.TypeConverter (1)
System\ComponentModel\EnumConverter.cs (1)
31EnumType = type;
26 references to EnumType
System.ComponentModel.TypeConverter (26)
System\ComponentModel\EnumConverter.cs (26)
88bool isUnderlyingTypeUInt64 = Enum.GetUnderlyingType(EnumType) == typeof(ulong); 93convertedValue |= GetEnumValue(isUnderlyingTypeUInt64, Enum.Parse(EnumType, v, true), culture); 95return Enum.ToObject(EnumType, convertedValue); 99return Enum.Parse(EnumType, strValue, true); 104throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, EnumType.Name), e); 109bool isUnderlyingTypeUInt64 = Enum.GetUnderlyingType(EnumType) == typeof(ulong); 115return Enum.ToObject(EnumType, finalValue); 131if (!EnumType.IsDefined(typeof(FlagsAttribute), false) && !Enum.IsDefined(EnumType, value)) 133throw new ArgumentException(SR.Format(SR.EnumConverterInvalidValue, value, EnumType.Name)); 136return Enum.Format(EnumType, value, "G"); 143if (EnumType.IsDefined(typeof(FlagsAttribute), false) && enumName.Contains(',')) 150Type underlyingType = Enum.GetUnderlyingType(EnumType); 158return new InstanceDescriptor(method, new object[] { EnumType, convertedValue }); 165FieldInfo? GetEnumField(string name) => EnumType.GetField(name); 177if (EnumType.IsDefined(typeof(FlagsAttribute), false)) 179bool isUnderlyingTypeUInt64 = Enum.GetUnderlyingType(EnumType) == typeof(ulong); 182Array objValues = Enum.GetValuesAsUnderlyingType(EnumType); 198flagValues.Add((Enum)Enum.ToObject(EnumType, ul)); 213flagValues.Add((Enum)Enum.ToObject(EnumType, longValue)); 220return new Enum[] { (Enum)Enum.ToObject(EnumType, value) }; 244Type _reflectType = GetTypeDescriptorReflectionType(EnumType); 252fields = GetPublicStaticEnumFields(EnumType); 284value = Enum.Parse(EnumType, field.Name); 319return !EnumType.IsDefined(typeof(FlagsAttribute), false); 331public override bool IsValid(ITypeDescriptorContext? context, object? value) => Enum.IsDefined(EnumType, value!);