Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ManifestBuilder.cs
Go to the documentation of this file.
6using System.Text;
7
9
10internal sealed class ManifestBuilder
11{
12 private sealed class ChannelInfo
13 {
14 public string Name;
15
16 public ulong Keywords;
17
19 }
20
21 private static readonly string[] s_escapes = new string[8] { "&", "<", ">", "'", """, "%r", "%n", "%t" };
22
24
26
28
30
32
34
35 private ulong nextChannelKeywordBit = 9223372036854775808uL;
36
37 private readonly StringBuilder sb;
38
39 private readonly StringBuilder events;
40
41 private readonly StringBuilder templates;
42
43 private readonly string providerName;
44
45 private readonly ResourceManager resources;
46
47 private readonly EventManifestOptions flags;
48
49 private readonly IList<string> errors;
50
52
53 private string eventName;
54
55 private int numParams;
56
58
60
61 public bool HasResources => resources != null;
62
64 {
65 this.providerName = providerName;
66 this.flags = flags;
67 this.resources = resources;
68 sb = new StringBuilder();
69 events = new StringBuilder();
73 errors = new List<string>();
75 sb.AppendLine("<instrumentationManifest xmlns=\"http://schemas.microsoft.com/win/2004/08/events\">");
76 sb.AppendLine(" <instrumentation xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:win=\"http://manifests.microsoft.com/win/2004/08/windows/events\">");
77 sb.AppendLine(" <events xmlns=\"http://schemas.microsoft.com/win/2004/08/events\">");
81 handler.AppendLiteral("<provider name=\"");
83 handler.AppendLiteral("\" guid=\"{");
85 handler.AppendLiteral("}\"");
86 stringBuilder2.Append(ref handler);
87 if (dllName != null)
88 {
92 handler2.AppendLiteral(" resourceFileName=\"");
93 handler2.AppendFormatted(dllName);
94 handler2.AppendLiteral("\" messageFileName=\"");
95 handler2.AppendFormatted(dllName);
96 handler2.AppendLiteral("\"");
98 }
99 string value = providerName.Replace("-", "").Replace('.', '_');
103 handler3.AppendLiteral(" symbol=\"");
104 handler3.AppendFormatted(value);
105 handler3.AppendLiteral("\">");
106 stringBuilder4.AppendLine(ref handler3);
107 }
108
109 public void AddOpcode(string name, int value)
110 {
111 if ((flags & EventManifestOptions.Strict) != 0)
112 {
113 if (value <= 10 || value >= 239)
114 {
116 }
117 if (opcodeTab.TryGetValue(value, out var value2) && !name.Equals(value2, StringComparison.Ordinal))
118 {
120 }
121 }
122 opcodeTab[value] = name;
123 }
124
125 public void AddTask(string name, int value)
126 {
127 if ((flags & EventManifestOptions.Strict) != 0)
128 {
129 if (value <= 0 || value >= 65535)
130 {
132 }
133 if (taskTab != null && taskTab.TryGetValue(value, out var value2) && !name.Equals(value2, StringComparison.Ordinal))
134 {
136 }
137 }
138 if (taskTab == null)
139 {
141 }
142 taskTab[value] = name;
143 }
144
145 public void AddKeyword(string name, ulong value)
146 {
147 if ((value & (value - 1)) != 0L)
148 {
150 }
151 if ((flags & EventManifestOptions.Strict) != 0)
152 {
153 if (value >= 17592186044416L && !name.StartsWith("Session", StringComparison.Ordinal))
154 {
156 }
157 if (keywordTab != null && keywordTab.TryGetValue(value, out var value2) && !name.Equals(value2, StringComparison.Ordinal))
158 {
160 }
161 }
162 if (keywordTab == null)
163 {
165 }
166 keywordTab[value] = name;
167 }
168
170 {
172 if (value < 16 || value > 255)
173 {
175 }
176 else if ((int)eventChannel >= 16 && (int)eventChannel <= 19 && channelAttribute != null && EventChannelToChannelType(eventChannel) != channelAttribute.EventChannelType)
177 {
179 }
181 if (channelTab == null)
182 {
184 }
186 {
187 Name = name,
188 Keywords = channelKeyword,
189 Attribs = channelAttribute
190 };
191 }
192
194 {
195 return (EventChannelType)(channel - 16 + 1);
196 }
197
199 {
201 eventChannelAttribute.EventChannelType = EventChannelToChannelType(channel);
202 if (eventChannelAttribute.EventChannelType <= EventChannelType.Operational)
203 {
204 eventChannelAttribute.Enabled = true;
205 }
207 }
208
209 public ulong[] GetChannelData()
210 {
211 if (channelTab == null)
212 {
213 return Array.Empty<ulong>();
214 }
215 int num = -1;
216 foreach (int key in channelTab.Keys)
217 {
218 if (key > num)
219 {
220 num = key;
221 }
222 }
223 ulong[] array = new ulong[num + 1];
225 {
226 array[item.Key] = item.Value.Keywords;
227 }
228 return array;
229 }
230
232 {
233 this.eventName = eventName;
234 numParams = 0;
235 byteArrArgIndices = null;
236 events.Append(" <event value=\"").Append(eventAttribute.EventId).Append("\" version=\"")
237 .Append(eventAttribute.Version)
238 .Append("\" level=\"");
240 events.Append("\" symbol=\"").Append(eventName).Append('"');
242 if (eventAttribute.Keywords != EventKeywords.None)
243 {
244 events.Append(" keywords=\"");
246 events.Append('"');
247 }
248 if (eventAttribute.Opcode != 0)
249 {
250 events.Append(" opcode=\"").Append(GetOpcodeName(eventAttribute.Opcode, eventName)).Append('"');
251 }
252 if (eventAttribute.Task != 0)
253 {
255 }
256 if (eventAttribute.Channel != 0)
257 {
258 events.Append(" channel=\"").Append(GetChannelName(eventAttribute.Channel, eventName, eventAttribute.Message)).Append('"');
259 }
260 }
261
262 public void AddEventParameter(Type type, string name)
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 }
300
301 public void EndEvent()
302 {
303 if (numParams > 0)
304 {
305 templates.AppendLine(" </template>");
306 events.Append(" template=\"").Append(eventName).Append("Args\"");
307 }
308 events.AppendLine("/>");
309 if (byteArrArgIndices != null)
310 {
312 }
313 string key = "event_" + eventName;
315 {
318 }
319 eventName = null;
320 numParams = 0;
321 byteArrArgIndices = null;
322 }
323
324 public ulong GetChannelKeyword(EventChannel channel, ulong channelKeyword = 0uL)
325 {
326 channelKeyword &= 0xF000000000000000uL;
327 if (channelTab == null)
328 {
330 }
331 if (channelTab.Count == 8)
332 {
334 }
335 if (!channelTab.TryGetValue((int)channel, out var value))
336 {
337 if (channelKeyword == 0L)
338 {
341 }
342 }
343 else
344 {
345 channelKeyword = value.Keywords;
346 }
347 return channelKeyword;
348 }
349
350 public byte[] CreateManifest()
351 {
352 string s = CreateManifestString();
353 return Encoding.UTF8.GetBytes(s);
354 }
355
356 public void ManifestError(string msg, bool runtimeCritical = false)
357 {
358 if ((flags & EventManifestOptions.Strict) != 0)
359 {
360 errors.Add(msg);
361 }
362 else if (runtimeCritical)
363 {
364 throw new ArgumentException(msg);
365 }
366 }
367
368 private string CreateManifestString()
369 {
371 if (channelTab != null)
372 {
373 sb.AppendLine(" <channels>");
376 {
377 list.Add(item);
378 }
379 list.Sort((KeyValuePair<int, ChannelInfo> p1, KeyValuePair<int, ChannelInfo> p2) => -Comparer<ulong>.Default.Compare(p1.Value.Keywords, p2.Value.Keywords));
381 {
382 int key = item2.Key;
383 ChannelInfo value = item2.Value;
384 string text = null;
385 bool flag = false;
386 string text2 = null;
387 if (value.Attribs != null)
388 {
390 if (Enum.IsDefined(typeof(EventChannelType), attribs.EventChannelType))
391 {
392 text = attribs.EventChannelType.ToString();
393 }
394 flag = attribs.Enabled;
395 }
396 if (text2 == null)
397 {
398 text2 = providerName + "/" + value.Name;
399 }
400 sb.Append(" <channel chid=\"").Append(value.Name).Append("\" name=\"")
401 .Append(text2)
402 .Append('"');
403 WriteMessageAttrib(sb, "channel", value.Name, null);
404 sb.Append(" value=\"").Append(key).Append('"');
405 if (text != null)
406 {
407 sb.Append(" type=\"").Append(text).Append('"');
408 }
409 sb.Append(" enabled=\"").Append(flag ? "true" : "false").Append('"');
410 sb.AppendLine("/>");
411 }
412 sb.AppendLine(" </channels>");
413 }
414 if (taskTab != null)
415 {
416 sb.AppendLine(" <tasks>");
418 list2.Sort();
419 foreach (int item3 in list2)
420 {
421 sb.Append(" <task");
423 sb.Append(" value=\"").Append(item3).AppendLine("\"/>");
424 }
425 sb.AppendLine(" </tasks>");
426 }
427 if (mapsTab != null)
428 {
429 sb.AppendLine(" <maps>");
430 foreach (Type value3 in mapsTab.Values)
431 {
433 string value2 = (flag2 ? "bitMap" : "valueMap");
434 sb.Append(" <").Append(value2).Append(" name=\"")
435 .Append(value3.Name)
436 .AppendLine("\">");
438 bool flag3 = false;
440 foreach (FieldInfo fieldInfo in array2)
441 {
442 object rawConstantValue = fieldInfo.GetRawConstantValue();
443 if (rawConstantValue != null)
444 {
445 ulong num = ((!(rawConstantValue is ulong)) ? ((ulong)Convert.ToInt64(rawConstantValue)) : ((ulong)rawConstantValue));
446 if (!flag2 || ((num & (num - 1)) == 0L && num != 0L))
447 {
448 num.TryFormat(destination, out var charsWritten, "x");
450 sb.Append(" <map value=\"0x").Append(span).Append('"');
451 WriteMessageAttrib(sb, "map", value3.Name + "." + fieldInfo.Name, fieldInfo.Name);
452 sb.AppendLine("/>");
453 flag3 = true;
454 }
455 }
456 }
457 if (!flag3)
458 {
459 sb.Append(" <map value=\"0x0\"");
460 WriteMessageAttrib(sb, "map", value3.Name + ".None", "None");
461 sb.AppendLine("/>");
462 }
463 sb.Append(" </").Append(value2).AppendLine(">");
464 }
465 sb.AppendLine(" </maps>");
466 }
467 sb.AppendLine(" <opcodes>");
469 list3.Sort();
470 foreach (int item4 in list3)
471 {
472 sb.Append(" <opcode");
474 sb.Append(" value=\"").Append(item4).AppendLine("\"/>");
475 }
476 sb.AppendLine(" </opcodes>");
477 if (keywordTab != null)
478 {
479 sb.AppendLine(" <keywords>");
481 list4.Sort();
482 foreach (ulong item5 in list4)
483 {
484 sb.Append(" <keyword");
486 item5.TryFormat(destination, out var charsWritten2, "x");
488 sb.Append(" mask=\"0x").Append(span2).AppendLine("\"/>");
489 }
490 sb.AppendLine(" </keywords>");
491 }
492 sb.AppendLine(" <events>");
494 sb.AppendLine(" </events>");
495 sb.AppendLine(" <templates>");
496 if (templates.Length > 0)
497 {
499 }
500 else
501 {
502 sb.AppendLine(" <template tid=\"_empty\"></template>");
503 }
504 sb.AppendLine(" </templates>");
505 sb.AppendLine("</provider>");
506 sb.AppendLine("</events>");
507 sb.AppendLine("</instrumentation>");
508 sb.AppendLine("<localization>");
509 string[] array3 = new string[stringTab.Keys.Count];
510 stringTab.Keys.CopyTo(array3, 0);
511 Array.Sort(array3, 0, array3.Length);
513 sb.Append(" <resources culture=\"").Append(currentUICulture.Name).AppendLine("\">");
514 sb.AppendLine(" <stringTable>");
515 string[] array4 = array3;
516 foreach (string text3 in array4)
517 {
519 sb.Append(" <string id=\"").Append(text3).Append("\" value=\"")
521 .AppendLine("\"/>");
522 }
523 sb.AppendLine(" </stringTable>");
524 sb.AppendLine(" </resources>");
525 sb.AppendLine("</localization>");
526 sb.AppendLine("</instrumentationManifest>");
527 return sb.ToString();
528 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2070:UnrecognizedReflectionPattern", Justification = "Trimmer does not trim enums")]
530 {
531 return localEnumType.GetFields(BindingFlags.DeclaredOnly | BindingFlags.Static | BindingFlags.Public);
532 }
533 }
534
535 private void WriteNameAndMessageAttribs(StringBuilder stringBuilder, string elementName, string name)
536 {
537 stringBuilder.Append(" name=\"").Append(name).Append('"');
538 WriteMessageAttrib(sb, elementName, name, name);
539 }
540
541 private void WriteMessageAttrib(StringBuilder stringBuilder, string elementName, string name, string value)
542 {
543 string text = null;
544 if (resources != null)
545 {
546 text = elementName + "_" + name;
548 if (@string != null)
549 {
550 value = @string;
551 }
552 }
553 if (value != null)
554 {
555 if (text == null)
556 {
557 text = elementName + "_" + name;
558 }
559 stringBuilder.Append(" message=\"$(string.").Append(text).Append(")\"");
561 {
563 }
564 else
565 {
567 }
568 }
569 }
570
571 internal string GetLocalizedMessage(string key, CultureInfo ci, bool etwFormat)
572 {
573 string value = null;
574 if (resources != null)
575 {
576 string @string = resources.GetString(key, ci);
577 if (@string != null)
578 {
579 value = @string;
580 if (etwFormat && key.StartsWith("event_", StringComparison.Ordinal))
581 {
582 string evtName = key.Substring("event_".Length);
584 }
585 }
586 }
587 if (etwFormat && value == null)
588 {
590 }
591 return value;
592 }
593
594 private static void AppendLevelName(StringBuilder sb, EventLevel level)
595 {
596 if (level < (EventLevel)16)
597 {
598 sb.Append("win:");
599 }
600 string value;
601 switch (level)
602 {
603 case EventLevel.LogAlways:
604 value = "LogAlways";
605 break;
606 case EventLevel.Critical:
607 value = "Critical";
608 break;
609 case EventLevel.Error:
610 value = "Error";
611 break;
612 case EventLevel.Warning:
613 value = "Warning";
614 break;
615 case EventLevel.Informational:
616 value = "Informational";
617 break;
618 case EventLevel.Verbose:
619 value = "Verbose";
620 break;
621 default:
622 {
623 int num = (int)level;
624 value = num.ToString();
625 break;
626 }
627 }
628 sb.Append(value);
629 }
630
631 private string GetChannelName(EventChannel channel, string eventName, string eventMessage)
632 {
633 if (channelTab == null || !channelTab.TryGetValue((int)channel, out var value))
634 {
635 if ((int)channel < 16)
636 {
638 }
639 if (channelTab == null)
640 {
642 }
643 string text = channel.ToString();
644 if (19 < (int)channel)
645 {
646 text = "Channel" + text;
647 }
648 AddChannel(text, (int)channel, GetDefaultChannelAttribute(channel));
649 if (!channelTab.TryGetValue((int)channel, out value))
650 {
652 }
653 }
654 if (resources != null && eventMessage == null)
655 {
657 }
658 if (value.Attribs.EventChannelType == EventChannelType.Admin && eventMessage == null)
659 {
661 }
662 return value.Name;
663 }
664
665 private string GetTaskName(EventTask task, string eventName)
666 {
667 if (task == EventTask.None)
668 {
669 return "";
670 }
671 if (taskTab == null)
672 {
674 }
675 if (!taskTab.TryGetValue((int)task, out var value))
676 {
677 return taskTab[(int)task] = eventName;
678 }
679 return value;
680 }
681
682 private string GetOpcodeName(EventOpcode opcode, string eventName)
683 {
684 switch (opcode)
685 {
686 case EventOpcode.Info:
687 return "win:Info";
688 case EventOpcode.Start:
689 return "win:Start";
690 case EventOpcode.Stop:
691 return "win:Stop";
692 case EventOpcode.DataCollectionStart:
693 return "win:DC_Start";
694 case EventOpcode.DataCollectionStop:
695 return "win:DC_Stop";
696 case EventOpcode.Extension:
697 return "win:Extension";
698 case EventOpcode.Reply:
699 return "win:Reply";
700 case EventOpcode.Resume:
701 return "win:Resume";
702 case EventOpcode.Suspend:
703 return "win:Suspend";
704 case EventOpcode.Send:
705 return "win:Send";
706 case EventOpcode.Receive:
707 return "win:Receive";
708 default:
709 {
710 if (opcodeTab == null || !opcodeTab.TryGetValue((int)opcode, out var value))
711 {
713 return null;
714 }
715 return value;
716 }
717 }
718 }
719
720 private void AppendKeywords(StringBuilder sb, ulong keywords, string eventName)
721 {
722 keywords &= 0xFFFFFFFFFFFFFFFuL;
723 bool flag = false;
724 for (ulong num = 1uL; num != 0L; num <<= 1)
725 {
726 if ((keywords & num) != 0L)
727 {
728 string value = null;
729 if ((keywordTab == null || !keywordTab.TryGetValue(num, out value)) && num >= 281474976710656L)
730 {
731 value = string.Empty;
732 }
733 if (value == null)
734 {
736 value = string.Empty;
737 }
738 if (value.Length != 0)
739 {
740 if (flag)
741 {
742 sb.Append(' ');
743 }
744 sb.Append(value);
745 flag = true;
746 }
747 }
748 }
749 }
750
751 private string GetTypeName(Type type)
752 {
753 if (type.IsEnum)
754 {
755 string typeName = GetTypeName(type.GetEnumUnderlyingType());
756 return typeName.Replace("win:Int", "win:UInt");
757 }
758 switch (Type.GetTypeCode(type))
759 {
760 case TypeCode.Boolean:
761 return "win:Boolean";
762 case TypeCode.Byte:
763 return "win:UInt8";
764 case TypeCode.Char:
765 case TypeCode.UInt16:
766 return "win:UInt16";
767 case TypeCode.UInt32:
768 return "win:UInt32";
769 case TypeCode.UInt64:
770 return "win:UInt64";
771 case TypeCode.SByte:
772 return "win:Int8";
773 case TypeCode.Int16:
774 return "win:Int16";
775 case TypeCode.Int32:
776 return "win:Int32";
777 case TypeCode.Int64:
778 return "win:Int64";
779 case TypeCode.String:
780 return "win:UnicodeString";
781 case TypeCode.Single:
782 return "win:Float";
783 case TypeCode.Double:
784 return "win:Double";
785 case TypeCode.DateTime:
786 return "win:FILETIME";
787 default:
788 if (type == typeof(Guid))
789 {
790 return "win:GUID";
791 }
792 if (type == typeof(IntPtr))
793 {
794 return "win:Pointer";
795 }
796 if ((type.IsArray || type.IsPointer) && type.GetElementType() == typeof(byte))
797 {
798 return "win:Binary";
799 }
801 return string.Empty;
802 }
803 }
804
806 {
807 if (stringBuilder == null)
808 {
810 }
812 }
813
815 {
817 int num = 0;
818 int i = 0;
819 while (i < eventMessage.Length)
820 {
821 int num4;
822 if (eventMessage[i] == '%')
823 {
825 stringBuilder.Append("%%");
826 i++;
827 num = i;
828 }
829 else if (i < eventMessage.Length - 1 && ((eventMessage[i] == '{' && eventMessage[i + 1] == '{') || (eventMessage[i] == '}' && eventMessage[i + 1] == '}')))
830 {
832 stringBuilder.Append(eventMessage[i]);
833 i++;
834 i++;
835 num = i;
836 }
837 else if (eventMessage[i] == '{')
838 {
839 int num2 = i;
840 i++;
841 int num3 = 0;
842 for (; i < eventMessage.Length && char.IsDigit(eventMessage[i]); i++)
843 {
844 num3 = num3 * 10 + eventMessage[i] - 48;
845 }
846 if (i < eventMessage.Length && eventMessage[i] == '}')
847 {
848 i++;
851 stringBuilder.Append('%').Append(value);
852 if (i < eventMessage.Length && eventMessage[i] == '!')
853 {
854 i++;
855 stringBuilder.Append("%!");
856 }
857 num = i;
858 }
859 else
860 {
862 }
863 }
864 else if ((num4 = "&<>'\"\r\n\t".IndexOf(eventMessage[i])) >= 0)
865 {
867 i++;
869 num = i;
870 }
871 else
872 {
873 i++;
874 }
875 }
876 if (stringBuilder == null)
877 {
878 return eventMessage;
879 }
881 return stringBuilder.ToString();
882 }
883
885 {
887 {
888 foreach (int item in value)
889 {
890 if (idx >= item)
891 {
892 idx++;
893 continue;
894 }
895 break;
896 }
897 }
898 return idx + 1;
899 }
900}
static void Sort(Array array)
Definition Array.cs:2329
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)
static long ToInt64(object? value)
Definition Convert.cs:1623
static bool IsCustomAttributeDefinedHelper(MemberInfo member, Type attributeType, EventManifestOptions flags=EventManifestOptions.None)
string GetChannelName(EventChannel channel, string eventName, string eventMessage)
readonly EventManifestOptions flags
static EventChannelAttribute GetDefaultChannelAttribute(EventChannel channel)
ManifestBuilder(string providerName, Guid providerGuid, string dllName, ResourceManager resources, EventManifestOptions flags)
ulong GetChannelKeyword(EventChannel channel, ulong channelKeyword=0uL)
void WriteNameAndMessageAttribs(StringBuilder stringBuilder, string elementName, string name)
void AddKeyword(string name, ulong value)
int TranslateIndexToManifestConvention(int idx, string evtName)
void StartEvent(string eventName, EventAttribute eventAttribute)
static void UpdateStringBuilder([NotNull] ref StringBuilder stringBuilder, string eventMessage, int startIndex, int count)
void ManifestError(string msg, bool runtimeCritical=false)
static void AppendLevelName(StringBuilder sb, EventLevel level)
readonly Dictionary< string, List< int > > perEventByteArrayArgIndices
readonly Dictionary< int, string > opcodeTab
void AddEventParameter(Type type, string name)
string GetLocalizedMessage(string key, CultureInfo ci, bool etwFormat)
readonly Dictionary< string, string > stringTab
void AppendKeywords(StringBuilder sb, ulong keywords, string eventName)
static EventChannelType EventChannelToChannelType(EventChannel channel)
void WriteMessageAttrib(StringBuilder stringBuilder, string elementName, string name, string value)
string GetOpcodeName(EventOpcode opcode, string eventName)
string TranslateToManifestConvention(string eventMessage, string evtName)
void AddChannel(string name, int value, EventChannelAttribute channelAttribute)
string GetTaskName(EventTask task, string eventName)
Dictionary< int, ChannelInfo > channelTab
static Type GetUnderlyingType(Type enumType)
Definition Enum.cs:309
static bool IsDefined(Type enumType, object value)
Definition Enum.cs:359
static CultureInfo CurrentUICulture
static CultureInfo CurrentCulture
static CultureInfo InvariantCulture
virtual ? string GetString(string name)
static string EventSource_TaskCollision
Definition SR.cs:1276
static string EventSource_DuplicateStringKey
Definition SR.cs:1194
static string EventSource_IllegalKeywordsValue
Definition SR.cs:1218
static string EventSource_EventChannelOutOfRange
Definition SR.cs:1200
static string EventSource_UnsupportedMessageProperty
Definition SR.cs:1302
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string EventSource_EventWithAdminChannelMustHaveMessage
Definition SR.cs:1216
static string EventSource_OpcodeCollision
Definition SR.cs:1268
static string EventSource_UndefinedKeyword
Definition SR.cs:1294
static string EventSource_MaxChannelExceeded
Definition SR.cs:1242
static string EventSource_KeywordNeedPowerOfTwo
Definition SR.cs:1234
static string EventSource_IllegalOpcodeValue
Definition SR.cs:1220
static string EventSource_UndefinedOpcode
Definition SR.cs:1296
static string EventSource_UnsupportedEventTypeInManifest
Definition SR.cs:1300
static string EventSource_IllegalTaskValue
Definition SR.cs:1222
static string EventSource_UndefinedChannel
Definition SR.cs:1292
static string EventSource_ChannelTypeDoesNotMatchEventChannelValue
Definition SR.cs:1190
static string EventSource_KeywordCollision
Definition SR.cs:1232
Definition SR.cs:7
static Encoding UTF8
Definition Encoding.cs:526
override string ToString()
StringBuilder Append(char value, int repeatCount)
static TypeCode GetTypeCode(Type? type)
Definition Type.cs:919
TypeCode
Definition TypeCode.cs:4