122 references to CustomAttributeEncoding
System.Private.CoreLib (122)
src\System\Reflection\Emit\CustomAttributeBuilder.cs (19)
177
writer.Write((byte)
CustomAttributeEncoding
.Property);
229
writer.Write((byte)
CustomAttributeEncoding
.Field);
286
writer.Write((byte)
CustomAttributeEncoding
.SByte);
289
writer.Write((byte)
CustomAttributeEncoding
.Byte);
292
writer.Write((byte)
CustomAttributeEncoding
.Char);
295
writer.Write((byte)
CustomAttributeEncoding
.Boolean);
298
writer.Write((byte)
CustomAttributeEncoding
.Int16);
301
writer.Write((byte)
CustomAttributeEncoding
.UInt16);
304
writer.Write((byte)
CustomAttributeEncoding
.Int32);
307
writer.Write((byte)
CustomAttributeEncoding
.UInt32);
310
writer.Write((byte)
CustomAttributeEncoding
.Int64);
313
writer.Write((byte)
CustomAttributeEncoding
.UInt64);
316
writer.Write((byte)
CustomAttributeEncoding
.Float);
319
writer.Write((byte)
CustomAttributeEncoding
.Double);
328
writer.Write((byte)
CustomAttributeEncoding
.Enum);
333
writer.Write((byte)
CustomAttributeEncoding
.String);
337
writer.Write((byte)
CustomAttributeEncoding
.Type);
341
writer.Write((byte)
CustomAttributeEncoding
.Array);
347
writer.Write((byte)
CustomAttributeEncoding
.Object);
src\System\Reflection\RuntimeCustomAttributeData.cs (103)
113
internal static
CustomAttributeEncoding
TypeToCustomAttributeEncoding(RuntimeType type)
116
return
CustomAttributeEncoding
.Int32;
119
return
CustomAttributeEncoding
.Enum;
122
return
CustomAttributeEncoding
.String;
125
return
CustomAttributeEncoding
.Type;
128
return
CustomAttributeEncoding
.Object;
131
return
CustomAttributeEncoding
.Array;
134
return
CustomAttributeEncoding
.Char;
137
return
CustomAttributeEncoding
.Boolean;
140
return
CustomAttributeEncoding
.Byte;
143
return
CustomAttributeEncoding
.SByte;
146
return
CustomAttributeEncoding
.Int16;
149
return
CustomAttributeEncoding
.UInt16;
152
return
CustomAttributeEncoding
.UInt32;
155
return
CustomAttributeEncoding
.Int64;
158
return
CustomAttributeEncoding
.UInt64;
161
return
CustomAttributeEncoding
.Float;
164
return
CustomAttributeEncoding
.Double;
168
return
CustomAttributeEncoding
.Object;
171
return
CustomAttributeEncoding
.Object;
174
return
CustomAttributeEncoding
.Object;
177
return
CustomAttributeEncoding
.Undefined;
286
CustomAttributeEncoding
.Field,
294
CustomAttributeEncoding
.Property,
458
&& p.EncodedArgument.CustomAttributeType.EncodedType !=
CustomAttributeEncoding
.Undefined)
473
&& p.EncodedArgument.CustomAttributeType.EncodedType !=
CustomAttributeEncoding
.Undefined)
499
private static Type CustomAttributeEncodingToType(
CustomAttributeEncoding
encodedType)
503
CustomAttributeEncoding
.Enum => typeof(Enum),
504
CustomAttributeEncoding
.Int32 => typeof(int),
505
CustomAttributeEncoding
.String => typeof(string),
506
CustomAttributeEncoding
.Type => typeof(Type),
507
CustomAttributeEncoding
.Array => typeof(Array),
508
CustomAttributeEncoding
.Char => typeof(char),
509
CustomAttributeEncoding
.Boolean => typeof(bool),
510
CustomAttributeEncoding
.SByte => typeof(sbyte),
511
CustomAttributeEncoding
.Byte => typeof(byte),
512
CustomAttributeEncoding
.Int16 => typeof(short),
513
CustomAttributeEncoding
.UInt16 => typeof(ushort),
514
CustomAttributeEncoding
.UInt32 => typeof(uint),
515
CustomAttributeEncoding
.Int64 => typeof(long),
516
CustomAttributeEncoding
.UInt64 => typeof(ulong),
517
CustomAttributeEncoding
.Float => typeof(float),
518
CustomAttributeEncoding
.Double => typeof(double),
519
CustomAttributeEncoding
.Object => typeof(object),
524
private static object EncodedValueToRawValue(PrimitiveValue val,
CustomAttributeEncoding
encodedType)
528
CustomAttributeEncoding
.Boolean => (byte)val.Byte4 != 0,
529
CustomAttributeEncoding
.Char => (char)val.Byte4,
530
CustomAttributeEncoding
.Byte => (byte)val.Byte4,
531
CustomAttributeEncoding
.SByte => (sbyte)val.Byte4,
532
CustomAttributeEncoding
.Int16 => (short)val.Byte4,
533
CustomAttributeEncoding
.UInt16 => (ushort)val.Byte4,
534
CustomAttributeEncoding
.Int32 => val.Byte4,
535
CustomAttributeEncoding
.UInt32 => (uint)val.Byte4,
536
CustomAttributeEncoding
.Int64 => val.Byte8,
537
CustomAttributeEncoding
.UInt64 => (ulong)val.Byte8,
538
CustomAttributeEncoding
.Float => BitConverter.Int32BitsToSingle(val.Byte4),
539
CustomAttributeEncoding
.Double => BitConverter.Int64BitsToDouble(val.Byte8),
553
CustomAttributeEncoding
encodedType = encodedArg.CustomAttributeType.EncodedType;
555
if (encodedType ==
CustomAttributeEncoding
.Undefined)
558
if (encodedType ==
CustomAttributeEncoding
.Enum)
563
else if (encodedType ==
CustomAttributeEncoding
.String)
568
else if (encodedType ==
CustomAttributeEncoding
.Type)
577
else if (encodedType ==
CustomAttributeEncoding
.Array)
582
if (encodedType ==
CustomAttributeEncoding
.Enum)
729
CustomAttributeEncoding
namedArgFieldOrProperty = parser.GetTag();
730
if (namedArgFieldOrProperty is not
CustomAttributeEncoding
.Field
731
&& namedArgFieldOrProperty is not
CustomAttributeEncoding
.Property)
752
if (namedArgType.EncodedType !=
CustomAttributeEncoding
.Object)
760
if (argType.EncodedType is
CustomAttributeEncoding
.Array
761
&& namedArgType.EncodedArrayType is not
CustomAttributeEncoding
.Object
775
if (namedArgType.EncodedType is
CustomAttributeEncoding
.Enum
776
|| (namedArgType.EncodedType is
CustomAttributeEncoding
.Array
777
&& namedArgType.EncodedArrayType is
CustomAttributeEncoding
.Enum))
811
CustomAttributeType attributeType = type.EncodedType ==
CustomAttributeEncoding
.Object
817
CustomAttributeEncoding
underlyingType = attributeType.EncodedType ==
CustomAttributeEncoding
.Enum
823
case
CustomAttributeEncoding
.Boolean:
824
case
CustomAttributeEncoding
.Byte:
825
case
CustomAttributeEncoding
.SByte:
828
case
CustomAttributeEncoding
.Char:
829
case
CustomAttributeEncoding
.Int16:
830
case
CustomAttributeEncoding
.UInt16:
833
case
CustomAttributeEncoding
.Int32:
834
case
CustomAttributeEncoding
.UInt32:
837
case
CustomAttributeEncoding
.Int64:
838
case
CustomAttributeEncoding
.UInt64:
841
case
CustomAttributeEncoding
.Float:
844
case
CustomAttributeEncoding
.Double:
847
case
CustomAttributeEncoding
.String:
848
case
CustomAttributeEncoding
.Type:
851
case
CustomAttributeEncoding
.Array:
859
CustomAttributeEncoding
.Undefined, // Array type
879
CustomAttributeEncoding
arrayTag =
CustomAttributeEncoding
.Undefined;
880
CustomAttributeEncoding
enumTag =
CustomAttributeEncoding
.Undefined;
883
CustomAttributeEncoding
tag = parser.GetTag();
884
if (tag is
CustomAttributeEncoding
.Array)
890
if (tag is
CustomAttributeEncoding
.Enum
891
|| (tag is
CustomAttributeEncoding
.Array
892
&& arrayTag is
CustomAttributeEncoding
.Enum))
973
public
CustomAttributeEncoding
GetTag()
975
return (
CustomAttributeEncoding
)GetI1();