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); 92convertedValue |= GetEnumValue(isUnderlyingTypeUInt64, Enum.Parse(EnumType, strValue.AsSpan(v), true), culture); 94return Enum.ToObject(EnumType, convertedValue); 98return Enum.Parse(EnumType, strValue, true); 103throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, EnumType.Name), e); 108bool isUnderlyingTypeUInt64 = Enum.GetUnderlyingType(EnumType) == typeof(ulong); 114return Enum.ToObject(EnumType, finalValue); 130if (!EnumType.IsDefined(typeof(FlagsAttribute), false) && !Enum.IsDefined(EnumType, value)) 132throw new ArgumentException(SR.Format(SR.EnumConverterInvalidValue, value, EnumType.Name)); 135return Enum.Format(EnumType, value, "G"); 142if (EnumType.IsDefined(typeof(FlagsAttribute), false) && enumName.Contains(',')) 149Type underlyingType = Enum.GetUnderlyingType(EnumType); 157return new InstanceDescriptor(method, new object[] { EnumType, convertedValue }); 164FieldInfo? GetEnumField(string name) => EnumType.GetField(name); 176if (EnumType.IsDefined(typeof(FlagsAttribute), false)) 178bool isUnderlyingTypeUInt64 = Enum.GetUnderlyingType(EnumType) == typeof(ulong); 181Array objValues = Enum.GetValuesAsUnderlyingType(EnumType); 197flagValues.Add((Enum)Enum.ToObject(EnumType, ul)); 212flagValues.Add((Enum)Enum.ToObject(EnumType, longValue)); 219return new Enum[] { (Enum)Enum.ToObject(EnumType, value) }; 243Type _reflectType = GetTypeDescriptorReflectionType(EnumType); 251fields = GetPublicStaticEnumFields(EnumType); 283value = Enum.Parse(EnumType, field.Name); 318return !EnumType.IsDefined(typeof(FlagsAttribute), false); 330public override bool IsValid(ITypeDescriptorContext? context, object? value) => Enum.IsDefined(EnumType, value!);