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

◆ AddChannel()

void System.Diagnostics.Tracing.ManifestBuilder.AddChannel ( string name,
int value,
EventChannelAttribute channelAttribute )
inline

Definition at line 169 of file ManifestBuilder.cs.

170 {
172 if (value < 16 || value > 255)
173 {
174 ManifestError(SR.Format(SR.EventSource_EventChannelOutOfRange, name, value));
175 }
176 else if ((int)eventChannel >= 16 && (int)eventChannel <= 19 && channelAttribute != null && EventChannelToChannelType(eventChannel) != channelAttribute.EventChannelType)
177 {
178 ManifestError(SR.Format(SR.EventSource_ChannelTypeDoesNotMatchEventChannelValue, name, ((EventChannel)value).ToString()));
179 }
181 if (channelTab == null)
182 {
184 }
185 channelTab[value] = new ChannelInfo
186 {
187 Name = name,
189 Attribs = channelAttribute
190 };
191 }
ulong GetChannelKeyword(EventChannel channel, ulong channelKeyword=0uL)
void ManifestError(string msg, bool runtimeCritical=false)
static EventChannelType EventChannelToChannelType(EventChannel channel)
Dictionary< int, ChannelInfo > channelTab

References System.Diagnostics.Tracing.ManifestBuilder.channelTab, System.Diagnostics.Tracing.ManifestBuilder.EventChannelToChannelType(), System.SR.EventSource_ChannelTypeDoesNotMatchEventChannelValue, System.SR.EventSource_EventChannelOutOfRange, System.SR.Format(), System.Diagnostics.Tracing.ManifestBuilder.GetChannelKeyword(), System.Diagnostics.Tracing.ManifestBuilder.ManifestError(), System.Name, and System.value.

Referenced by System.Diagnostics.Tracing.ManifestBuilder.GetChannelName().