Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ProjectAttributeTargetValue()

static AttributeTargets System.Reflection.Metadata.CustomAttribute.ProjectAttributeTargetValue ( uint rawValue)
inlinestaticprivate

Definition at line 94 of file CustomAttribute.cs.

95 {
96 if (rawValue == uint.MaxValue)
97 {
98 return AttributeTargets.All;
99 }
100 AttributeTargets attributeTargets = (AttributeTargets)0;
101 if ((rawValue & (true ? 1u : 0u)) != 0)
102 {
103 attributeTargets |= AttributeTargets.Delegate;
104 }
105 if ((rawValue & 2u) != 0)
106 {
107 attributeTargets |= AttributeTargets.Enum;
108 }
109 if ((rawValue & 4u) != 0)
110 {
111 attributeTargets |= AttributeTargets.Event;
112 }
113 if ((rawValue & 8u) != 0)
114 {
115 attributeTargets |= AttributeTargets.Field;
116 }
117 if ((rawValue & 0x10u) != 0)
118 {
119 attributeTargets |= AttributeTargets.Interface;
120 }
121 if ((rawValue & 0x40u) != 0)
122 {
123 attributeTargets |= AttributeTargets.Method;
124 }
125 if ((rawValue & 0x80u) != 0)
126 {
127 attributeTargets |= AttributeTargets.Parameter;
128 }
129 if ((rawValue & 0x100u) != 0)
130 {
131 attributeTargets |= AttributeTargets.Property;
132 }
133 if ((rawValue & 0x200u) != 0)
134 {
135 attributeTargets |= AttributeTargets.Class;
136 }
137 if ((rawValue & 0x400u) != 0)
138 {
139 attributeTargets |= AttributeTargets.Struct;
140 }
141 return attributeTargets;
142 }

Referenced by System.Reflection.Metadata.CustomAttribute.GetProjectedValue().