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