Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ResourceReader.cs
Go to the documentation of this file.
5using System.IO;
7using System.Text;
9
10namespace System.Resources;
11
13{
15 {
16 private readonly ResourceReader _reader;
17
18 private bool _currentIsValid;
19
20 private int _currentName;
21
22 private int _dataPosition;
23
24 public object Key
25 {
26 get
27 {
28 if (_currentName == int.MinValue)
29 {
31 }
32 if (!_currentIsValid)
33 {
35 }
36 if (_reader._resCache == null)
37 {
39 }
41 }
42 }
43
44 public object Current => Entry;
45
46 internal int DataPosition => _dataPosition;
47
49 {
50 get
51 {
52 if (_currentName == int.MinValue)
53 {
55 }
56 if (!_currentIsValid)
57 {
59 }
60 if (_reader._resCache == null)
61 {
63 }
64 object obj = null;
65 string key;
67 {
69 {
72 {
73 obj = value.Value;
74 }
75 if (obj == null)
76 {
78 }
79 }
80 }
81 return new DictionaryEntry(key, obj);
82 }
83 }
84
85 public object Value
86 {
87 get
88 {
89 if (_currentName == int.MinValue)
90 {
92 }
93 if (!_currentIsValid)
94 {
96 }
97 if (_reader._resCache == null)
98 {
100 }
102 }
103 }
104
106 {
107 _currentName = -1;
108 _reader = reader;
109 _dataPosition = -2;
110 }
111
112 public bool MoveNext()
113 {
114 if (_currentName == _reader._numResources - 1 || _currentName == int.MinValue)
115 {
116 _currentIsValid = false;
117 _currentName = int.MinValue;
118 return false;
119 }
120 _currentIsValid = true;
121 _currentName++;
122 return true;
123 }
124
125 public void Reset()
126 {
127 if (_reader._resCache == null)
128 {
130 }
131 _currentIsValid = false;
132 _currentName = -1;
133 }
134 }
135
136 private readonly bool _permitDeserialization;
137
138 private object _binaryFormatter;
139
140 [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]
142
144
146
148
149 private long _nameSectionOffset;
150
151 private long _dataSectionOffset;
152
153 private int[] _nameHashes;
154
155 private unsafe int* _nameHashesPtr;
156
157 private int[] _namePositions;
158
159 private unsafe int* _namePositionsPtr;
160
161 private Type[] _typeTable;
162
163 private int[] _typeNamePositions;
164
165 private int _numResources;
166
168
169 private int _version;
170
171 internal static bool AllowCustomResourceTypes { get; } = !AppContext.TryGetSwitch("System.Resources.ResourceManager.AllowCustomResourceTypes", out var isEnabled) || isEnabled;
172
173
182
183 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "InitializeBinaryFormatter will get trimmed out when AllowCustomResourceTypes is set to false. When set to true, we will already throw a warning for this feature switch, so we suppress this one in order forthe user to only get one error.")]
206
207 [RequiresUnreferencedCode("The CustomResourceTypesSupport feature switch has been enabled for this app which is being trimmed. Custom readers as well as custom objects on the resources file are not observable by the trimmer and so required assemblies, types and members may be removed.")]
209 {
211 {
212 Type type = Type.GetType("System.Runtime.Serialization.Formatters.Binary.BinaryFormatter, System.Runtime.Serialization.Formatters", throwOnError: true);
213 MethodInfo method = type.GetMethod("Deserialize", new Type[1] { typeof(Stream) });
214 MethodInfo? method2 = typeof(ResourceReader).GetMethod("CreateUntypedDelegate", BindingFlags.Static | BindingFlags.NonPublic);
215 object obj;
216 if ((object)method2 == null)
217 {
218 obj = null;
219 }
220 else
221 {
222 MethodInfo methodInfo = method2.MakeGenericMethod(type);
223 object[] parameters = new MethodInfo[1] { method };
224 obj = methodInfo.Invoke(null, parameters);
225 }
229 }
231 return s_deserializeMethod != null;
232 }
233
239
240 private static bool ValidateReaderType(string readerType)
241 {
242 return ResourceManager.IsDefaultType(readerType, "System.Resources.ResourceReader");
243 }
244
245 public void GetResourceData(string resourceName, out string resourceType, out byte[] resourceData)
246 {
247 if (resourceName == null)
248 {
249 throw new ArgumentNullException("resourceName");
250 }
251 if (_resCache == null)
252 {
254 }
255 int[] array = new int[_numResources];
257 if (num == -1)
258 {
260 }
261 lock (this)
262 {
263 for (int i = 0; i < _numResources; i++)
264 {
265 _store.BaseStream.Position = _nameSectionOffset + GetNamePosition(i);
267 if (num2 < 0)
268 {
270 }
271 _store.BaseStream.Position += num2;
272 int num3 = _store.ReadInt32();
274 {
276 }
277 array[i] = num3;
278 }
280 int num4 = Array.BinarySearch(array, num);
281 long num5 = ((num4 < _numResources - 1) ? (array[num4 + 1] + _dataSectionOffset) : _store.BaseStream.Length);
282 int num6 = (int)(num5 - (num + _dataSectionOffset));
283 _store.BaseStream.Position = _dataSectionOffset + num;
285 if (resourceTypeCode < ResourceTypeCode.Null || (int)resourceTypeCode >= 64 + _typeTable.Length)
286 {
288 }
290 num6 -= (int)(_store.BaseStream.Position - (_dataSectionOffset + num));
291 byte[] array2 = _store.ReadBytes(num6);
292 if (array2.Length != num6)
293 {
295 }
297 }
298 }
299
301 {
303 _store = new BinaryReader(new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, FileOptions.RandomAccess), Encoding.UTF8);
304 try
305 {
307 }
308 catch
309 {
310 _store.Close();
311 throw;
312 }
313 }
314
316 {
317 if (stream == null)
318 {
319 throw new ArgumentNullException("stream");
320 }
321 if (!stream.CanRead)
322 {
324 }
329 }
330
331 public void Close()
332 {
333 Dispose(disposing: true);
334 }
335
336 public void Dispose()
337 {
338 Close();
339 }
340
341 private unsafe void Dispose(bool disposing)
342 {
343 if (_store != null)
344 {
345 _resCache = null;
346 if (disposing)
347 {
349 _store = null;
350 store?.Close();
351 }
352 _store = null;
353 _namePositions = null;
354 _nameHashes = null;
355 _ums = null;
356 _namePositionsPtr = null;
357 _nameHashesPtr = null;
358 }
359 }
360
361 internal unsafe static int ReadUnalignedI4(int* p)
362 {
364 }
365
366 private void SkipString()
367 {
368 int num = _store.Read7BitEncodedInt();
369 if (num < 0)
370 {
372 }
373 _store.BaseStream.Seek(num, SeekOrigin.Current);
374 }
375
376 private unsafe int GetNameHash(int index)
377 {
378 if (_ums == null)
379 {
380 return _nameHashes[index];
381 }
383 }
384
385 private unsafe int GetNamePosition(int index)
386 {
387 int num = ((_ums != null) ? ReadUnalignedI4(_namePositionsPtr + index) : _namePositions[index]);
389 {
391 }
392 return num;
393 }
394
399
401 {
402 if (_resCache == null)
403 {
405 }
406 return new ResourceEnumerator(this);
407 }
408
410 {
411 return new ResourceEnumerator(this);
412 }
413
414 internal int FindPosForResource(string name)
415 {
416 int num = FastResourceComparer.HashFunction(name);
417 int num2 = 0;
418 int i = _numResources - 1;
419 int num3 = -1;
420 bool flag = false;
421 while (num2 <= i)
422 {
423 num3 = num2 + i >> 1;
425 int num4 = ((nameHash != num) ? ((nameHash >= num) ? 1 : (-1)) : 0);
426 if (num4 == 0)
427 {
428 flag = true;
429 break;
430 }
431 if (num4 < 0)
432 {
433 num2 = num3 + 1;
434 }
435 else
436 {
437 i = num3 - 1;
438 }
439 }
440 if (!flag)
441 {
442 return -1;
443 }
444 if (num2 != num3)
445 {
446 num2 = num3;
447 while (num2 > 0 && GetNameHash(num2 - 1) == num)
448 {
449 num2--;
450 }
451 }
452 if (i != num3)
453 {
454 for (i = num3; i < _numResources - 1 && GetNameHash(i + 1) == num; i++)
455 {
456 }
457 }
458 lock (this)
459 {
460 for (int j = num2; j <= i; j++)
461 {
463 if (CompareStringEqualsName(name))
464 {
465 int num5 = _store.ReadInt32();
467 {
469 }
470 return num5;
471 }
472 }
473 }
474 return -1;
475 }
476
477 private unsafe bool CompareStringEqualsName(string name)
478 {
479 int num = _store.Read7BitEncodedInt();
480 if (num < 0)
481 {
483 }
484 if (_ums != null)
485 {
487 _ums.Seek(num, SeekOrigin.Current);
488 if (_ums.Position > _ums.Length)
489 {
491 }
493 }
494 byte[] array = new byte[num];
495 int num2 = num;
496 while (num2 > 0)
497 {
498 int num3 = _store.Read(array, num - num2, num2);
499 if (num3 == 0)
500 {
502 }
503 num2 -= num3;
504 }
505 return FastResourceComparer.CompareOrdinal(array, num / 2, name) == 0;
506 }
507
508 private unsafe string AllocateStringForNameIndex(int index, out int dataOffset)
509 {
510 long num = GetNamePosition(index);
511 int num2;
512 byte[] array;
513 lock (this)
514 {
517 if (num2 < 0)
518 {
520 }
521 if (_ums != null)
522 {
523 if (_ums.Position > _ums.Length - num2)
524 {
526 }
527 string text = null;
528 char* positionPointer = (char*)_ums.PositionPointer;
530 text = new string(positionPointer, 0, num2 / 2);
531 _ums.Position += num2;
534 {
536 }
537 return text;
538 }
539 array = new byte[num2];
540 int num3 = num2;
541 while (num3 > 0)
542 {
543 int num4 = _store.Read(array, num2 - num3, num3);
544 if (num4 == 0)
545 {
547 }
548 num3 -= num4;
549 }
552 {
554 }
555 }
556 return Encoding.Unicode.GetString(array, 0, num2);
557 }
558
559 private object GetValueForNameIndex(int index)
560 {
561 long num = GetNamePosition(index);
562 lock (this)
563 {
565 SkipString();
566 int num2 = _store.ReadInt32();
568 {
570 }
571 if (_version == 1)
572 {
573 return LoadObjectV1(num2);
574 }
575 ResourceTypeCode typeCode;
576 return LoadObjectV2(num2, out typeCode);
577 }
578 }
579
580 internal string LoadString(int pos)
581 {
583 string result = null;
584 int num = _store.Read7BitEncodedInt();
585 if (_version == 1)
586 {
587 if (num == -1)
588 {
589 return null;
590 }
591 if (FindType(num) != typeof(string))
592 {
594 }
595 result = _store.ReadString();
596 }
597 else
598 {
601 {
603 }
605 {
606 result = _store.ReadString();
607 }
608 }
609 return result;
610 }
611
612 internal object LoadObject(int pos)
613 {
614 if (_version == 1)
615 {
616 return LoadObjectV1(pos);
617 }
618 ResourceTypeCode typeCode;
619 return LoadObjectV2(pos, out typeCode);
620 }
621
622 internal object LoadObject(int pos, out ResourceTypeCode typeCode)
623 {
624 if (_version == 1)
625 {
626 object obj = LoadObjectV1(pos);
627 typeCode = ((obj is string) ? ResourceTypeCode.String : ResourceTypeCode.StartOfUserTypes);
628 return obj;
629 }
630 return LoadObjectV2(pos, out typeCode);
631 }
632
633 internal object LoadObjectV1(int pos)
634 {
635 try
636 {
637 return _LoadObjectV1(pos);
638 }
639 catch (EndOfStreamException inner)
640 {
642 }
644 {
646 }
647 }
648
649 private object _LoadObjectV1(int pos)
650 {
652 int num = _store.Read7BitEncodedInt();
653 if (num == -1)
654 {
655 return null;
656 }
657 Type type = FindType(num);
658 if (type == typeof(string))
659 {
660 return _store.ReadString();
661 }
662 if (type == typeof(int))
663 {
664 return _store.ReadInt32();
665 }
666 if (type == typeof(byte))
667 {
668 return _store.ReadByte();
669 }
670 if (type == typeof(sbyte))
671 {
672 return _store.ReadSByte();
673 }
674 if (type == typeof(short))
675 {
676 return _store.ReadInt16();
677 }
678 if (type == typeof(long))
679 {
680 return _store.ReadInt64();
681 }
682 if (type == typeof(ushort))
683 {
684 return _store.ReadUInt16();
685 }
686 if (type == typeof(uint))
687 {
688 return _store.ReadUInt32();
689 }
690 if (type == typeof(ulong))
691 {
692 return _store.ReadUInt64();
693 }
694 if (type == typeof(float))
695 {
696 return _store.ReadSingle();
697 }
698 if (type == typeof(double))
699 {
700 return _store.ReadDouble();
701 }
702 if (type == typeof(DateTime))
703 {
704 return new DateTime(_store.ReadInt64());
705 }
706 if (type == typeof(TimeSpan))
707 {
708 return new TimeSpan(_store.ReadInt64());
709 }
710 if (type == typeof(decimal))
711 {
712 int[] array = new int[4];
713 for (int i = 0; i < array.Length; i++)
714 {
715 array[i] = _store.ReadInt32();
716 }
717 return new decimal(array);
718 }
719 return DeserializeObject(num);
720 }
721
722 internal object LoadObjectV2(int pos, out ResourceTypeCode typeCode)
723 {
724 try
725 {
726 return _LoadObjectV2(pos, out typeCode);
727 }
728 catch (EndOfStreamException inner)
729 {
731 }
733 {
735 }
736 }
737
738 private unsafe object _LoadObjectV2(int pos, out ResourceTypeCode typeCode)
739 {
742 switch (typeCode)
743 {
744 case ResourceTypeCode.Null:
745 return null;
746 case ResourceTypeCode.String:
747 return _store.ReadString();
748 case ResourceTypeCode.Boolean:
749 return _store.ReadBoolean();
750 case ResourceTypeCode.Char:
751 return (char)_store.ReadUInt16();
752 case ResourceTypeCode.Byte:
753 return _store.ReadByte();
754 case ResourceTypeCode.SByte:
755 return _store.ReadSByte();
756 case ResourceTypeCode.Int16:
757 return _store.ReadInt16();
758 case ResourceTypeCode.UInt16:
759 return _store.ReadUInt16();
760 case ResourceTypeCode.Int32:
761 return _store.ReadInt32();
762 case ResourceTypeCode.UInt32:
763 return _store.ReadUInt32();
764 case ResourceTypeCode.Int64:
765 return _store.ReadInt64();
766 case ResourceTypeCode.UInt64:
767 return _store.ReadUInt64();
768 case ResourceTypeCode.Single:
769 return _store.ReadSingle();
770 case ResourceTypeCode.Double:
771 return _store.ReadDouble();
772 case ResourceTypeCode.Decimal:
773 return _store.ReadDecimal();
774 case ResourceTypeCode.DateTime:
775 {
776 long dateData = _store.ReadInt64();
778 }
779 case ResourceTypeCode.TimeSpan:
780 {
781 long ticks = _store.ReadInt64();
782 return new TimeSpan(ticks);
783 }
784 case ResourceTypeCode.ByteArray:
785 {
786 int num2 = _store.ReadInt32();
787 if (num2 < 0)
788 {
790 }
791 if (_ums == null)
792 {
793 if (num2 > _store.BaseStream.Length)
794 {
796 }
797 return _store.ReadBytes(num2);
798 }
799 if (num2 > _ums.Length - _ums.Position)
800 {
802 }
803 byte[] array2 = new byte[num2];
804 int num3 = _ums.Read(array2, 0, num2);
805 return array2;
806 }
807 case ResourceTypeCode.Stream:
808 {
809 int num = _store.ReadInt32();
810 if (num < 0)
811 {
813 }
814 if (_ums == null)
815 {
816 byte[] array = _store.ReadBytes(num);
818 }
819 if (num > _ums.Length - _ums.Position)
820 {
822 }
823 return new UnmanagedMemoryStream(_ums.PositionPointer, num, num, FileAccess.Read);
824 }
825 default:
826 {
827 if (typeCode < ResourceTypeCode.StartOfUserTypes)
828 {
830 }
831 int typeIndex = (int)(typeCode - 64);
833 }
834 }
835 }
836
837 [MemberNotNull("_typeTable")]
838 [MemberNotNull("_typeNamePositions")]
839 private void ReadResources()
840 {
841 try
842 {
844 }
845 catch (EndOfStreamException inner)
846 {
848 }
850 {
852 }
853 }
854
855 [MemberNotNull("_typeTable")]
856 [MemberNotNull("_typeNamePositions")]
857 private unsafe void _ReadResources()
858 {
859 int num = _store.ReadInt32();
860 if (num != ResourceManager.MagicNumber)
861 {
863 }
864 int num2 = _store.ReadInt32();
865 int num3 = _store.ReadInt32();
866 if (num3 < 0 || num2 < 0)
867 {
869 }
870 if (num2 > 1)
871 {
872 _store.BaseStream.Seek(num3, SeekOrigin.Current);
873 }
874 else
875 {
876 string text = _store.ReadString();
878 {
880 }
881 SkipString();
882 }
883 int num4 = _store.ReadInt32();
884 if (num4 != 2 && num4 != 1)
885 {
887 }
888 _version = num4;
890 if (_numResources < 0)
891 {
893 }
894 int num5 = _store.ReadInt32();
895 if (num5 < 0)
896 {
898 }
899 _typeTable = new Type[num5];
900 _typeNamePositions = new int[num5];
901 for (int i = 0; i < num5; i++)
902 {
903 _typeNamePositions[i] = (int)_store.BaseStream.Position;
904 SkipString();
905 }
906 long position = _store.BaseStream.Position;
907 int num6 = (int)position & 7;
908 if (num6 != 0)
909 {
910 for (int j = 0; j < 8 - num6; j++)
911 {
913 }
914 }
915 if (_ums == null)
916 {
917 _nameHashes = new int[_numResources];
918 for (int k = 0; k < _numResources; k++)
919 {
921 }
922 }
923 else
924 {
925 int num7 = 4 * _numResources;
926 if (num7 < 0)
927 {
929 }
931 _ums.Seek(num7, SeekOrigin.Current);
933 }
934 if (_ums == null)
935 {
936 _namePositions = new int[_numResources];
937 for (int l = 0; l < _numResources; l++)
938 {
939 int num8 = _store.ReadInt32();
940 if (num8 < 0)
941 {
943 }
945 }
946 }
947 else
948 {
949 int num9 = 4 * _numResources;
950 if (num9 < 0)
951 {
953 }
955 _ums.Seek(num9, SeekOrigin.Current);
957 }
959 if (_dataSectionOffset < 0)
960 {
962 }
965 {
967 }
968 }
969
970 [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:RequiresUnreferencedCode", Justification = "UseReflectionToGetType will get trimmed out when AllowCustomResourceTypes is set to false. When set to true, we will already throw a warning for this feature switch, so we suppress this one in order forthe user to only get one error.")]
983
984 [RequiresUnreferencedCode("The CustomResourceTypesSupport feature switch has been enabled for this app which is being trimmed. Custom readers as well as custom objects on the resources file are not observable by the trimmer and so required assemblies, types and members may be removed.")]
986 {
987 long position = _store.BaseStream.Position;
988 try
989 {
990 _store.BaseStream.Position = _typeNamePositions[typeIndex];
991 string typeName = _store.ReadString();
992 _typeTable[typeIndex] = Type.GetType(typeName, throwOnError: true);
993 return _typeTable[typeIndex];
994 }
996 {
998 }
999 finally
1000 {
1001 _store.BaseStream.Position = position;
1002 }
1003 }
1004
1006 {
1007 if (typeCode < ResourceTypeCode.StartOfUserTypes)
1008 {
1009 return "ResourceTypeCode." + typeCode;
1010 }
1011 int num = (int)(typeCode - 64);
1012 long position = _store.BaseStream.Position;
1013 try
1014 {
1015 _store.BaseStream.Position = _typeNamePositions[num];
1016 return _store.ReadString();
1017 }
1018 finally
1019 {
1020 _store.BaseStream.Position = position;
1021 }
1022 }
1023}
static ? object CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type, BindingFlags bindingAttr, Binder? binder, object?[]? args, CultureInfo? culture)
Definition Activator.cs:17
static bool TryGetSwitch(string switchName, out bool isEnabled)
Definition AppContext.cs:74
static void Sort(Array array)
Definition Array.cs:2329
static int BinarySearch(Array array, object? value)
Definition Array.cs:1320
static readonly bool IsLittleEndian
static int ReadInt32LittleEndian(ReadOnlySpan< byte > source)
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
static ? Delegate CreateDelegate(Type type, object target, string method, bool ignoreCase, bool throwOnBindFailure)
Definition Delegate.cs:152
virtual bool ReadBoolean()
virtual double ReadDouble()
virtual byte ReadByte()
virtual string ReadString()
virtual ulong ReadUInt64()
virtual float ReadSingle()
virtual sbyte ReadSByte()
virtual ushort ReadUInt16()
virtual int ReadInt32()
virtual Stream BaseStream
virtual void Close()
virtual short ReadInt16()
virtual byte[] ReadBytes(int count)
virtual decimal ReadDecimal()
virtual long ReadInt64()
virtual uint ReadUInt32()
override long Seek(long offset, SeekOrigin loc)
override int Read(byte[] buffer, int offset, int count)
static unsafe int CompareOrdinal(string a, byte[] bytes, int bCharLength)
static readonly FastResourceComparer Default
static bool IsDefaultType(string asmTypeName, string typeName)
unsafe int GetNamePosition(int index)
unsafe bool CompareStringEqualsName(string name)
IDictionaryEnumerator GetEnumerator()
Type UseReflectionToGetType(int typeIndex)
unsafe string AllocateStringForNameIndex(int index, out int dataOffset)
void GetResourceData(string resourceName, out string resourceType, out byte[] resourceData)
object GetValueForNameIndex(int index)
unsafe object _LoadObjectV2(int pos, out ResourceTypeCode typeCode)
string TypeNameFromTypeCode(ResourceTypeCode typeCode)
static bool ValidateReaderType(string readerType)
static Func< object, Stream, object > s_deserializeMethod
unsafe int GetNameHash(int index)
static unsafe int ReadUnalignedI4(int *p)
object LoadObject(int pos, out ResourceTypeCode typeCode)
unsafe void Dispose(bool disposing)
IEnumerator IEnumerable. GetEnumerator()
ResourceReader(Stream stream, Dictionary< string, ResourceLocator > resCache, bool permitDeserialization)
object DeserializeObject(int typeIndex)
object LoadObjectV2(int pos, out ResourceTypeCode typeCode)
ResourceEnumerator GetEnumeratorInternal()
static Func< object, Stream, object > CreateUntypedDelegate< TInstance >(MethodInfo method)
Dictionary< string, ResourceLocator > _resCache
static string BadImageFormat_ResourcesNameInvalidOffset
Definition SR.cs:1170
static string InvalidOperation_EnumNotStarted
Definition SR.cs:46
static string NotSupported_WrongResourceReader_Type
Definition SR.cs:1738
static string InvalidOperation_EnumEnded
Definition SR.cs:42
static string BadImageFormat_TypeMismatch
Definition SR.cs:1174
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string BadImageFormat_ResourcesIndexTooLong
Definition SR.cs:1168
static string Resources_StreamNotValid
Definition SR.cs:1832
static string ResourceReaderIsClosed
Definition SR.cs:1830
static string Arg_ResourceNameNotExist
Definition SR.cs:398
static string NotSupported_ResourceObjectSerialization
Definition SR.cs:1710
static string Argument_StreamNotReadable
Definition SR.cs:876
static string BadImageFormat_ResourcesDataInvalidOffset
Definition SR.cs:1164
static string BinaryFormatter_SerializationDisallowed
Definition SR.cs:2180
static string BadImageFormat_ResourcesNameTooLong
Definition SR.cs:1172
static string Arg_ResourceFileUnsupportedVersion
Definition SR.cs:396
static string BadImageFormat_NegativeStringLength
Definition SR.cs:1152
static string BadImageFormat_ResType_SerBlobMismatch
Definition SR.cs:1156
static string BadImageFormat_InvalidType
Definition SR.cs:1150
static string InvalidOperation_ResourceNotString_Type
Definition SR.cs:1512
static string BadImageFormat_ResourcesHeaderCorrupted
Definition SR.cs:1166
static string ResourceManager_ReflectionNotAllowed
Definition SR.cs:2188
static string BadImageFormat_ResourceDataLengthInvalid
Definition SR.cs:1158
static string BadImageFormat_ResourceNameCorrupted
Definition SR.cs:1160
static string BadImageFormat_ResourceNameCorrupted_NameIndex
Definition SR.cs:1162
Definition SR.cs:7
static Encoding Unicode
Definition Encoding.cs:519
static Encoding UTF8
Definition Encoding.cs:526
static int CompareExchange(ref int location1, int value, int comparand)
static bool Read(ref bool location)
Definition Volatile.cs:67
static void Write(ref bool location, bool value)
Definition Volatile.cs:74
static ? Type GetType(string typeName, bool throwOnError, bool ignoreCase)
Definition Type.cs:408
string? FullName
Definition Type.cs:47
new IEnumerator< T > GetEnumerator()
static DateTime FromBinary(long dateData)
Definition DateTime.cs:671