1 write to type
System (1)
compmod\system\componentmodel\EnumConverter.cs (1)
53
this.
type
= type;
25 references to type
System (25)
compmod\system\componentmodel\EnumConverter.cs (25)
61
return
type
;
124
convertedValue |= Convert.ToInt64((Enum)Enum.Parse(
type
, v, true), culture);
126
return Enum.ToObject(
type
, convertedValue);
129
return Enum.Parse(
type
, strValue, true);
133
throw new FormatException(SR.GetString(SR.ConvertInvalidPrimitive, (string)value,
type
.Name), e);
141
return Enum.ToObject(
type
, finalValue);
162
Type underlyingType = Enum.GetUnderlyingType(
type
);
166
if (!
type
.IsDefined(typeof(FlagsAttribute), false) && !Enum.IsDefined(
type
, value)) {
167
throw new ArgumentException(SR.GetString(SR.EnumConverterInvalidValue, value.ToString(),
type
.Name));
170
return Enum.Format(
type
, value, "G");
175
if (
type
.IsDefined(typeof(FlagsAttribute), false) && enumName.IndexOf(',') != -1) {
181
Type underlyingType = Enum.GetUnderlyingType(
type
);
187
return new InstanceDescriptor(method, new object[] {
type
, convertedValue});
192
FieldInfo info =
type
.GetField(enumName);
199
if (
type
.IsDefined(typeof(FlagsAttribute), false)) {
202
Array objValues = Enum.GetValues(
type
);
214
flagValues.Add((Enum)Enum.ToObject(
type
, ul));
227
flagValues.Add((Enum)Enum.ToObject(
type
, longValue));
233
return new Enum[] {(Enum)Enum.ToObject(
type
, value)};
251
Type reflectType = TypeDescriptor.GetReflectionType(
type
);
253
reflectType =
type
;
275
value = Enum.Parse(
type
, field.Name);
307
return !
type
.IsDefined(typeof(FlagsAttribute), false);
327
return Enum.IsDefined(
type
, value);