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

◆ AddEventParameter()

void System.Diagnostics.Tracing.ManifestBuilder.AddEventParameter ( Type type,
string name )
inline

Definition at line 262 of file ManifestBuilder.cs.

263 {
264 if (numParams == 0)
265 {
266 templates.Append(" <template tid=\"").Append(eventName).AppendLine("Args\">");
267 }
268 if (type == typeof(byte[]))
269 {
270 if (byteArrArgIndices == null)
271 {
273 }
275 numParams++;
276 templates.Append(" <data name=\"").Append(name).AppendLine("Size\" inType=\"win:UInt32\"/>");
277 }
278 numParams++;
279 templates.Append(" <data name=\"").Append(name).Append("\" inType=\"")
281 .Append('"');
282 if ((type.IsArray || type.IsPointer) && type.GetElementType() == typeof(byte))
283 {
284 templates.Append(" length=\"").Append(name).Append("Size\"");
285 }
286 if (type.IsEnum && Enum.GetUnderlyingType(type) != typeof(ulong) && Enum.GetUnderlyingType(type) != typeof(long))
287 {
288 templates.Append(" map=\"").Append(type.Name).Append('"');
289 if (mapsTab == null)
290 {
292 }
293 if (!mapsTab.ContainsKey(type.Name))
294 {
295 mapsTab.Add(type.Name, type);
296 }
297 }
298 templates.AppendLine("/>");
299 }
void Add(TKey key, TValue value)
StringBuilder Append(char value, int repeatCount)

References System.Collections.Generic.List< T >.Add(), System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Text.StringBuilder.Append(), System.Text.StringBuilder.AppendLine(), System.Diagnostics.Tracing.ManifestBuilder.byteArrArgIndices, System.Collections.Generic.Dictionary< TKey, TValue >.ContainsKey(), System.Diagnostics.Tracing.ManifestBuilder.eventName, System.Diagnostics.Tracing.ManifestBuilder.GetTypeName(), System.Enum.GetUnderlyingType(), System.Diagnostics.Tracing.ManifestBuilder.mapsTab, System.Diagnostics.Tracing.ManifestBuilder.numParams, System.Diagnostics.Tracing.ManifestBuilder.templates, and System.type.