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.")]
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.")]
212 Type type =
Type.
GetType(
"System.Runtime.Serialization.Formatters.Binary.BinaryFormatter, System.Runtime.Serialization.Formatters",
throwOnError:
true);
271 _store.BaseStream.Position +=
num2;
460 for (
int j =
num2;
j <= i;
j++)
494 byte[]
array =
new byte[num];
531 _ums.Position +=
num2;
583 string result =
null;
712 int[]
array =
new int[4];
713 for (
int i = 0; i <
array.Length; i++)
717 return new decimal(
array);
901 for (
int i = 0; i <
num5; i++)
907 int num6 = (int)position & 7;
910 for (
int j = 0;
j < 8 -
num6;
j++)
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.")]
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.")]
1001 _store.BaseStream.Position = position;
1009 return "ResourceTypeCode." + typeCode;
1011 int num = (int)(typeCode - 64);
1020 _store.BaseStream.Position = position;
static ? object CreateInstance([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type, BindingFlags bindingAttr, Binder? binder, object?[]? args, CultureInfo? culture)
static bool TryGetSwitch(string switchName, out bool isEnabled)
static void Sort(Array array)
static int BinarySearch(Array array, object? value)
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)
virtual bool ReadBoolean()
virtual double ReadDouble()
virtual string ReadString()
virtual ulong ReadUInt64()
virtual float ReadSingle()
virtual sbyte ReadSByte()
virtual ushort ReadUInt16()
virtual Stream BaseStream
virtual short ReadInt16()
virtual byte[] ReadBytes(int count)
virtual decimal ReadDecimal()
virtual uint ReadUInt32()
unsafe byte * PositionPointer
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 int HashFunction(string key)
static readonly FastResourceComparer Default
static readonly int MagicNumber
static bool IsDefaultType(string asmTypeName, string typeName)
readonly ResourceReader _reader
ResourceEnumerator(ResourceReader reader)
unsafe int GetNamePosition(int index)
unsafe bool CompareStringEqualsName(string name)
object LoadObject(int pos)
IDictionaryEnumerator GetEnumerator()
Type UseReflectionToGetType(int typeIndex)
unsafe void _ReadResources()
unsafe string AllocateStringForNameIndex(int index, out int dataOffset)
unsafe int * _namePositionsPtr
void GetResourceData(string resourceName, out string resourceType, out byte[] resourceData)
ResourceReader(string fileName)
object GetValueForNameIndex(int index)
unsafe object _LoadObjectV2(int pos, out ResourceTypeCode typeCode)
string TypeNameFromTypeCode(ResourceTypeCode typeCode)
int FindPosForResource(string name)
string LoadString(int pos)
static bool ValidateReaderType(string readerType)
static Func< object, Stream, object > s_deserializeMethod
static bool AllowCustomResourceTypes
unsafe int GetNameHash(int index)
static unsafe int ReadUnalignedI4(int *p)
object LoadObjectV1(int pos)
Type FindType(int typeIndex)
object LoadObject(int pos, out ResourceTypeCode typeCode)
unsafe void Dispose(bool disposing)
readonly bool _permitDeserialization
static Type s_binaryFormatterType
object _LoadObjectV1(int pos)
IEnumerator IEnumerable. GetEnumerator()
ResourceReader(Stream stream, Dictionary< string, ResourceLocator > resCache, bool permitDeserialization)
UnmanagedMemoryStream _ums
object DeserializeObject(int typeIndex)
bool InitializeBinaryFormatter()
object LoadObjectV2(int pos, out ResourceTypeCode typeCode)
unsafe int * _nameHashesPtr
ResourceReader(Stream stream)
ResourceEnumerator GetEnumeratorInternal()
static Func< object, Stream, object > CreateUntypedDelegate< TInstance >(MethodInfo method)
Dictionary< string, ResourceLocator > _resCache
static string BadImageFormat_ResourcesNameInvalidOffset
static string InvalidOperation_EnumNotStarted
static string NotSupported_WrongResourceReader_Type
static string InvalidOperation_EnumEnded
static string BadImageFormat_TypeMismatch
static string Format(string resourceFormat, object p1)
static string BadImageFormat_ResourcesIndexTooLong
static string Resources_StreamNotValid
static string ResourceReaderIsClosed
static string Arg_ResourceNameNotExist
static string NotSupported_ResourceObjectSerialization
static string Argument_StreamNotReadable
static string BadImageFormat_ResourcesDataInvalidOffset
static string BinaryFormatter_SerializationDisallowed
static string BadImageFormat_ResourcesNameTooLong
static string Arg_ResourceFileUnsupportedVersion
static string BadImageFormat_NegativeStringLength
static string BadImageFormat_ResType_SerBlobMismatch
static string BadImageFormat_InvalidType
static string InvalidOperation_ResourceNotString_Type
static string BadImageFormat_ResourcesHeaderCorrupted
static string ResourceManager_ReflectionNotAllowed
static string BadImageFormat_ResourceDataLengthInvalid
static string BadImageFormat_ResourceNameCorrupted
static string BadImageFormat_ResourceNameCorrupted_NameIndex
static int CompareExchange(ref int location1, int value, int comparand)
static bool Read(ref bool location)
static void Write(ref bool location, bool value)
static ? Type GetType(string typeName, bool throwOnError, bool ignoreCase)
new IEnumerator< T > GetEnumerator()
DynamicallyAccessedMemberTypes
static DateTime FromBinary(long dateData)