Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PropertyDefinition.cs
Go to the documentation of this file.
3
5
6public readonly struct PropertyDefinition
7{
8 private readonly MetadataReader _reader;
9
10 private readonly int _rowId;
11
13
15
17
19
21 {
22 _reader = reader;
23 _rowId = handle.RowId;
24 }
25
27 {
30 return signatureDecoder.DecodeMethodSignature(ref blobReader);
31 }
32
37
42
44 {
45 int getterRowId = 0;
46 int setterRowId = 0;
48 ushort methodCount;
50 for (ushort num2 = 0; num2 < methodCount; num2++)
51 {
52 int rowId = num + num2;
54 {
55 case MethodSemanticsAttributes.Getter:
56 getterRowId = _reader.MethodSemanticsTable.GetMethod(rowId).RowId;
57 break;
58 case MethodSemanticsAttributes.Setter:
59 setterRowId = _reader.MethodSemanticsTable.GetMethod(rowId).RowId;
60 break;
62 if (builder == null)
63 {
64 builder = ImmutableArray.CreateBuilder<MethodDefinitionHandle>();
65 }
66 builder.Add(_reader.MethodSemanticsTable.GetMethod(rowId));
67 break;
68 }
69 }
71 return new PropertyAccessors(getterRowId, setterRowId, others);
72 }
73}
static readonly ImmutableArray< T > Empty
MethodSemanticsTableReader MethodSemanticsTable
BlobReader GetBlobReader(BlobHandle handle)
ConstantHandle FindConstant(EntityHandle parentHandle)
int FindSemanticMethodsForProperty(PropertyDefinitionHandle propertyDef, out ushort methodCount)
PropertyAttributes GetFlags(PropertyDefinitionHandle handle)
BlobHandle GetSignature(PropertyDefinitionHandle handle)
StringHandle GetName(PropertyDefinitionHandle handle)
MethodSignature< TType > DecodeMethodSignature(ref BlobReader blobReader)
static PropertyDefinitionHandle FromRowId(int rowId)
PropertyDefinition(MetadataReader reader, PropertyDefinitionHandle handle)
MethodSignature< TType > DecodeSignature< TType, TGenericContext >(ISignatureTypeProvider< TType, TGenericContext > provider, TGenericContext genericContext)
CustomAttributeHandleCollection GetCustomAttributes()