Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of BroheimSileroTTS v1.3.0
BepInEx/plugins/Broheim-SileroTTS/System.Runtime.CompilerServices.Unsafe.dll
Decompiled 2 days agousing System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyFileVersion("4.0.0.0")] [assembly: AssemblyInformationalVersion("4.0.0.0")] [assembly: AssemblyTitle("System.Runtime.CompilerServices.Unsafe")] [assembly: AssemblyDescription("System.Runtime.CompilerServices.Unsafe")] [assembly: AssemblyMetadata(".NETFrameworkAssembly", "")] [assembly: AssemblyMetadata("Serviceable", "True")] [assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: CLSCompliant(false)] [assembly: CompilationRelaxations(8)] [assembly: AssemblyVersion("4.0.4.1")] namespace System.Runtime.CompilerServices { public static class Unsafe : Object { [MethodImpl(256)] [NonVersionable] public unsafe static T Read<T>(void* source) { return Unsafe.Read<T>(source); } [MethodImpl(256)] [NonVersionable] public unsafe static T ReadUnaligned<T>(void* source) { return Unsafe.ReadUnaligned<T>(source); } [MethodImpl(256)] [NonVersionable] public static T ReadUnaligned<T>(ref byte source) { return Unsafe.ReadUnaligned<T>(ref source); } [MethodImpl(256)] [NonVersionable] public unsafe static void Write<T>(void* destination, T value) { Unsafe.Write(destination, value); } [MethodImpl(256)] [NonVersionable] public unsafe static void WriteUnaligned<T>(void* destination, T value) { Unsafe.WriteUnaligned(destination, value); } [MethodImpl(256)] [NonVersionable] public static void WriteUnaligned<T>(ref byte destination, T value) { Unsafe.WriteUnaligned(ref destination, value); } [MethodImpl(256)] [NonVersionable] public unsafe static void Copy<T>(void* destination, ref T source) { Unsafe.Write(destination, source); } [MethodImpl(256)] [NonVersionable] public unsafe static void Copy<T>(ref T destination, void* source) { destination = Unsafe.Read<T>(source); } [MethodImpl(256)] [NonVersionable] public unsafe static void* AsPointer<T>(ref T value) { return Unsafe.AsPointer(ref value); } [MethodImpl(256)] [NonVersionable] public static int SizeOf<T>() { return Unsafe.SizeOf<T>(); } [MethodImpl(256)] [NonVersionable] public unsafe static void CopyBlock(void* destination, void* source, uint byteCount) { // IL cpblk instruction Unsafe.CopyBlock(destination, source, byteCount); } [MethodImpl(256)] [NonVersionable] public static void CopyBlock(ref byte destination, ref byte source, uint byteCount) { // IL cpblk instruction Unsafe.CopyBlock(ref destination, ref source, byteCount); } [MethodImpl(256)] [NonVersionable] public unsafe static void CopyBlockUnaligned(void* destination, void* source, uint byteCount) { // IL cpblk instruction Unsafe.CopyBlockUnaligned(destination, source, byteCount); } [MethodImpl(256)] [NonVersionable] public static void CopyBlockUnaligned(ref byte destination, ref byte source, uint byteCount) { // IL cpblk instruction Unsafe.CopyBlockUnaligned(ref destination, ref source, byteCount); } [MethodImpl(256)] [NonVersionable] public unsafe static void InitBlock(void* startAddress, byte value, uint byteCount) { // IL initblk instruction Unsafe.InitBlock(startAddress, value, byteCount); } [MethodImpl(256)] [NonVersionable] public static void InitBlock(ref byte startAddress, byte value, uint byteCount) { // IL initblk instruction Unsafe.InitBlock(ref startAddress, value, byteCount); } [MethodImpl(256)] [NonVersionable] public unsafe static void InitBlockUnaligned(void* startAddress, byte value, uint byteCount) { // IL initblk instruction Unsafe.InitBlockUnaligned(startAddress, value, byteCount); } [MethodImpl(256)] [NonVersionable] public static void InitBlockUnaligned(ref byte startAddress, byte value, uint byteCount) { // IL initblk instruction Unsafe.InitBlockUnaligned(ref startAddress, value, byteCount); } [MethodImpl(256)] [NonVersionable] public static T As<T>(object o) where T : class { return (T)o; } [MethodImpl(256)] [NonVersionable] public unsafe static ref T AsRef<T>(void* source) { return ref *(T*)source; } [MethodImpl(256)] [NonVersionable] public static ref T AsRef<T>(in T source) { return ref source; } [MethodImpl(256)] [NonVersionable] public static ref TTo As<TFrom, TTo>(ref TFrom source) { return ref Unsafe.As<TFrom, TTo>(ref source); } [MethodImpl(256)] [NonVersionable] public static ref T Add<T>(ref T source, int elementOffset) { return ref Unsafe.Add(ref source, elementOffset); } [MethodImpl(256)] [NonVersionable] public unsafe static void* Add<T>(void* source, int elementOffset) { return (byte*)source + (nint)elementOffset * (nint)Unsafe.SizeOf<T>(); } [MethodImpl(256)] [NonVersionable] public static ref T Add<T>(ref T source, System.IntPtr elementOffset) { return ref Unsafe.Add(ref source, elementOffset); } [MethodImpl(256)] [NonVersionable] public static ref T AddByteOffset<T>(ref T source, System.IntPtr byteOffset) { return ref Unsafe.AddByteOffset(ref source, byteOffset); } [MethodImpl(256)] [NonVersionable] public static ref T Subtract<T>(ref T source, int elementOffset) { return ref Unsafe.Subtract(ref source, elementOffset); } [MethodImpl(256)] [NonVersionable] public unsafe static void* Subtract<T>(void* source, int elementOffset) { return (byte*)source - (nint)elementOffset * (nint)Unsafe.SizeOf<T>(); } [MethodImpl(256)] [NonVersionable] public static ref T Subtract<T>(ref T source, System.IntPtr elementOffset) { return ref Unsafe.Subtract(ref source, elementOffset); } [MethodImpl(256)] [NonVersionable] public static ref T SubtractByteOffset<T>(ref T source, System.IntPtr byteOffset) { return ref Unsafe.SubtractByteOffset(ref source, byteOffset); } [MethodImpl(256)] [NonVersionable] public static System.IntPtr ByteOffset<T>(ref T origin, ref T target) { return Unsafe.ByteOffset(target: ref target, origin: ref origin); } [MethodImpl(256)] [NonVersionable] public static bool AreSame<T>(ref T left, ref T right) { return Unsafe.AreSame(ref left, ref right); } [MethodImpl(256)] [NonVersionable] public static bool IsAddressGreaterThan<T>(ref T left, ref T right) { return Unsafe.IsAddressGreaterThan(ref left, ref right); } [MethodImpl(256)] [NonVersionable] public static bool IsAddressLessThan<T>(ref T left, ref T right) { return Unsafe.IsAddressLessThan(ref left, ref right); } } } namespace System.Runtime.Versioning { [AttributeUsage(/*Could not decode attribute arguments.*/)] internal sealed class NonVersionableAttribute : Attribute { } } namespace System.Runtime.CompilerServices { internal sealed class IsReadOnlyAttribute : Attribute { } }
BepInEx/plugins/Broheim-SileroTTS/System.Threading.ThreadPool.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Threading.ThreadPool")] [assembly: AssemblyDescription("System.Threading.ThreadPool")] [assembly: AssemblyDefaultAlias("System.Threading.ThreadPool")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.12.0")] [assembly: TypeForwardedTo(typeof(RegisteredWaitHandle))] [assembly: TypeForwardedTo(typeof(ThreadPool))] [assembly: TypeForwardedTo(typeof(WaitCallback))] [assembly: TypeForwardedTo(typeof(WaitOrTimerCallback))]
BepInEx/plugins/Broheim-SileroTTS/System.Globalization.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Globalization")] [assembly: AssemblyDescription("System.Globalization")] [assembly: AssemblyDefaultAlias("System.Globalization")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(Calendar))] [assembly: TypeForwardedTo(typeof(CalendarWeekRule))] [assembly: TypeForwardedTo(typeof(CharUnicodeInfo))] [assembly: TypeForwardedTo(typeof(CompareInfo))] [assembly: TypeForwardedTo(typeof(CompareOptions))] [assembly: TypeForwardedTo(typeof(CultureInfo))] [assembly: TypeForwardedTo(typeof(CultureNotFoundException))] [assembly: TypeForwardedTo(typeof(DateTimeFormatInfo))] [assembly: TypeForwardedTo(typeof(NumberFormatInfo))] [assembly: TypeForwardedTo(typeof(RegionInfo))] [assembly: TypeForwardedTo(typeof(StringInfo))] [assembly: TypeForwardedTo(typeof(TextElementEnumerator))] [assembly: TypeForwardedTo(typeof(TextInfo))] [assembly: TypeForwardedTo(typeof(UnicodeCategory))]
BepInEx/plugins/Broheim-SileroTTS/System.Net.Ping.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Net.NetworkInformation; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Net.Ping")] [assembly: AssemblyDescription("System.Net.Ping")] [assembly: AssemblyDefaultAlias("System.Net.Ping")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(IPStatus))] [assembly: TypeForwardedTo(typeof(Ping))] [assembly: TypeForwardedTo(typeof(PingException))] [assembly: TypeForwardedTo(typeof(PingOptions))] [assembly: TypeForwardedTo(typeof(PingReply))]
BepInEx/plugins/Broheim-SileroTTS/System.Runtime.Extensions.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.IO; using System.Net; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Runtime.Extensions")] [assembly: AssemblyDescription("System.Runtime.Extensions")] [assembly: AssemblyDefaultAlias("System.Runtime.Extensions")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(BitConverter))] [assembly: TypeForwardedTo(typeof(Convert))] [assembly: TypeForwardedTo(typeof(Stopwatch))] [assembly: TypeForwardedTo(typeof(Environment))] [assembly: TypeForwardedTo(typeof(Path))] [assembly: TypeForwardedTo(typeof(Math))] [assembly: TypeForwardedTo(typeof(MidpointRounding))] [assembly: TypeForwardedTo(typeof(WebUtility))] [assembly: TypeForwardedTo(typeof(Progress<>))] [assembly: TypeForwardedTo(typeof(Random))] [assembly: TypeForwardedTo(typeof(FrameworkName))] [assembly: TypeForwardedTo(typeof(StringComparer))] [assembly: TypeForwardedTo(typeof(UriBuilder))]
BepInEx/plugins/Broheim-SileroTTS/System.Diagnostics.Tracing.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Diagnostics.Tracing; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Diagnostics.Tracing")] [assembly: AssemblyDescription("System.Diagnostics.Tracing")] [assembly: AssemblyDefaultAlias("System.Diagnostics.Tracing")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(EventActivityOptions))] [assembly: TypeForwardedTo(typeof(EventAttribute))] [assembly: TypeForwardedTo(typeof(EventChannel))] [assembly: TypeForwardedTo(typeof(EventCommand))] [assembly: TypeForwardedTo(typeof(EventCommandEventArgs))] [assembly: TypeForwardedTo(typeof(EventCounter))] [assembly: TypeForwardedTo(typeof(EventDataAttribute))] [assembly: TypeForwardedTo(typeof(EventFieldAttribute))] [assembly: TypeForwardedTo(typeof(EventFieldFormat))] [assembly: TypeForwardedTo(typeof(EventFieldTags))] [assembly: TypeForwardedTo(typeof(EventIgnoreAttribute))] [assembly: TypeForwardedTo(typeof(EventKeywords))] [assembly: TypeForwardedTo(typeof(EventLevel))] [assembly: TypeForwardedTo(typeof(EventListener))] [assembly: TypeForwardedTo(typeof(EventManifestOptions))] [assembly: TypeForwardedTo(typeof(EventOpcode))] [assembly: TypeForwardedTo(typeof(EventSource))] [assembly: TypeForwardedTo(typeof(EventSourceAttribute))] [assembly: TypeForwardedTo(typeof(EventSourceException))] [assembly: TypeForwardedTo(typeof(EventSourceOptions))] [assembly: TypeForwardedTo(typeof(EventSourceSettings))] [assembly: TypeForwardedTo(typeof(EventTags))] [assembly: TypeForwardedTo(typeof(EventTask))] [assembly: TypeForwardedTo(typeof(EventWrittenEventArgs))] [assembly: TypeForwardedTo(typeof(NonEventAttribute))]
BepInEx/plugins/Broheim-SileroTTS/System.Xml.Serialization.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Xml.Serialization; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Xml.Serialization")] [assembly: AssemblyDescription("System.Xml.Serialization")] [assembly: AssemblyDefaultAlias("System.Xml.Serialization")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.0.0")] [assembly: TypeForwardedTo(typeof(IXmlSerializable))] [assembly: TypeForwardedTo(typeof(XmlAnyAttributeAttribute))] [assembly: TypeForwardedTo(typeof(XmlAnyElementAttribute))] [assembly: TypeForwardedTo(typeof(XmlAnyElementAttributes))] [assembly: TypeForwardedTo(typeof(XmlArrayAttribute))] [assembly: TypeForwardedTo(typeof(XmlArrayItemAttribute))] [assembly: TypeForwardedTo(typeof(XmlArrayItemAttributes))] [assembly: TypeForwardedTo(typeof(XmlAttributeAttribute))] [assembly: TypeForwardedTo(typeof(XmlAttributeOverrides))] [assembly: TypeForwardedTo(typeof(XmlAttributes))] [assembly: TypeForwardedTo(typeof(XmlChoiceIdentifierAttribute))] [assembly: TypeForwardedTo(typeof(XmlElementAttribute))] [assembly: TypeForwardedTo(typeof(XmlElementAttributes))] [assembly: TypeForwardedTo(typeof(XmlEnumAttribute))] [assembly: TypeForwardedTo(typeof(XmlIgnoreAttribute))] [assembly: TypeForwardedTo(typeof(XmlIncludeAttribute))] [assembly: TypeForwardedTo(typeof(XmlMapping))] [assembly: TypeForwardedTo(typeof(XmlMappingAccess))] [assembly: TypeForwardedTo(typeof(XmlNamespaceDeclarationsAttribute))] [assembly: TypeForwardedTo(typeof(XmlReflectionImporter))] [assembly: TypeForwardedTo(typeof(XmlRootAttribute))] [assembly: TypeForwardedTo(typeof(XmlSchemaProviderAttribute))] [assembly: TypeForwardedTo(typeof(XmlSerializer))] [assembly: TypeForwardedTo(typeof(XmlSerializerNamespaces))] [assembly: TypeForwardedTo(typeof(XmlTextAttribute))] [assembly: TypeForwardedTo(typeof(XmlTypeAttribute))] [assembly: TypeForwardedTo(typeof(XmlTypeMapping))]
BepInEx/plugins/Broheim-SileroTTS/System.Threading.Tasks.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Threading.Tasks")] [assembly: AssemblyDescription("System.Threading.Tasks")] [assembly: AssemblyDefaultAlias("System.Threading.Tasks")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(AggregateException))] [assembly: TypeForwardedTo(typeof(OperationCanceledException))] [assembly: TypeForwardedTo(typeof(AsyncTaskMethodBuilder))] [assembly: TypeForwardedTo(typeof(AsyncTaskMethodBuilder<>))] [assembly: TypeForwardedTo(typeof(AsyncVoidMethodBuilder))] [assembly: TypeForwardedTo(typeof(ConfiguredTaskAwaitable))] [assembly: TypeForwardedTo(typeof(ConfiguredTaskAwaitable<>))] [assembly: TypeForwardedTo(typeof(IAsyncStateMachine))] [assembly: TypeForwardedTo(typeof(ICriticalNotifyCompletion))] [assembly: TypeForwardedTo(typeof(INotifyCompletion))] [assembly: TypeForwardedTo(typeof(TaskAwaiter))] [assembly: TypeForwardedTo(typeof(TaskAwaiter<>))] [assembly: TypeForwardedTo(typeof(YieldAwaitable))] [assembly: TypeForwardedTo(typeof(CancellationToken))] [assembly: TypeForwardedTo(typeof(CancellationTokenRegistration))] [assembly: TypeForwardedTo(typeof(CancellationTokenSource))] [assembly: TypeForwardedTo(typeof(ConcurrentExclusiveSchedulerPair))] [assembly: TypeForwardedTo(typeof(Task))] [assembly: TypeForwardedTo(typeof(Task<>))] [assembly: TypeForwardedTo(typeof(TaskCanceledException))] [assembly: TypeForwardedTo(typeof(TaskCompletionSource<>))] [assembly: TypeForwardedTo(typeof(TaskContinuationOptions))] [assembly: TypeForwardedTo(typeof(TaskCreationOptions))] [assembly: TypeForwardedTo(typeof(TaskExtensions))] [assembly: TypeForwardedTo(typeof(TaskFactory))] [assembly: TypeForwardedTo(typeof(TaskFactory<>))] [assembly: TypeForwardedTo(typeof(TaskScheduler))] [assembly: TypeForwardedTo(typeof(TaskSchedulerException))] [assembly: TypeForwardedTo(typeof(TaskStatus))] [assembly: TypeForwardedTo(typeof(UnobservedTaskExceptionEventArgs))]
BepInEx/plugins/Broheim-SileroTTS/System.Collections.NonGeneric.dll
Decompiled 2 days agousing System; using System.Collections; using System.Collections.Specialized; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Collections.NonGeneric")] [assembly: AssemblyDescription("System.Collections.NonGeneric")] [assembly: AssemblyDefaultAlias("System.Collections.NonGeneric")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.3.0")] [assembly: TypeForwardedTo(typeof(ArrayList))] [assembly: TypeForwardedTo(typeof(CaseInsensitiveComparer))] [assembly: TypeForwardedTo(typeof(CollectionBase))] [assembly: TypeForwardedTo(typeof(Comparer))] [assembly: TypeForwardedTo(typeof(DictionaryBase))] [assembly: TypeForwardedTo(typeof(Hashtable))] [assembly: TypeForwardedTo(typeof(Queue))] [assembly: TypeForwardedTo(typeof(ReadOnlyCollectionBase))] [assembly: TypeForwardedTo(typeof(SortedList))] [assembly: TypeForwardedTo(typeof(CollectionsUtil))] [assembly: TypeForwardedTo(typeof(Stack))]
BepInEx/plugins/Broheim-SileroTTS/System.Threading.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Threading")] [assembly: AssemblyDescription("System.Threading")] [assembly: AssemblyDefaultAlias("System.Threading")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(AbandonedMutexException))] [assembly: TypeForwardedTo(typeof(AsyncLocal<>))] [assembly: TypeForwardedTo(typeof(AsyncLocalValueChangedArgs<>))] [assembly: TypeForwardedTo(typeof(AutoResetEvent))] [assembly: TypeForwardedTo(typeof(Barrier))] [assembly: TypeForwardedTo(typeof(BarrierPostPhaseException))] [assembly: TypeForwardedTo(typeof(ContextCallback))] [assembly: TypeForwardedTo(typeof(CountdownEvent))] [assembly: TypeForwardedTo(typeof(EventResetMode))] [assembly: TypeForwardedTo(typeof(EventWaitHandle))] [assembly: TypeForwardedTo(typeof(ExecutionContext))] [assembly: TypeForwardedTo(typeof(Interlocked))] [assembly: TypeForwardedTo(typeof(LazyInitializer))] [assembly: TypeForwardedTo(typeof(LockRecursionException))] [assembly: TypeForwardedTo(typeof(LockRecursionPolicy))] [assembly: TypeForwardedTo(typeof(ManualResetEvent))] [assembly: TypeForwardedTo(typeof(ManualResetEventSlim))] [assembly: TypeForwardedTo(typeof(Monitor))] [assembly: TypeForwardedTo(typeof(Mutex))] [assembly: TypeForwardedTo(typeof(ReaderWriterLockSlim))] [assembly: TypeForwardedTo(typeof(Semaphore))] [assembly: TypeForwardedTo(typeof(SemaphoreFullException))] [assembly: TypeForwardedTo(typeof(SemaphoreSlim))] [assembly: TypeForwardedTo(typeof(SendOrPostCallback))] [assembly: TypeForwardedTo(typeof(SpinLock))] [assembly: TypeForwardedTo(typeof(SpinWait))] [assembly: TypeForwardedTo(typeof(SynchronizationContext))] [assembly: TypeForwardedTo(typeof(SynchronizationLockException))] [assembly: TypeForwardedTo(typeof(ThreadLocal<>))] [assembly: TypeForwardedTo(typeof(Volatile))] [assembly: TypeForwardedTo(typeof(WaitHandleCannotBeOpenedException))]
BepInEx/plugins/Broheim-SileroTTS/System.Text.Encoding.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Text; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Text.Encoding")] [assembly: AssemblyDescription("System.Text.Encoding")] [assembly: AssemblyDefaultAlias("System.Text.Encoding")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(Decoder))] [assembly: TypeForwardedTo(typeof(DecoderExceptionFallback))] [assembly: TypeForwardedTo(typeof(DecoderFallback))] [assembly: TypeForwardedTo(typeof(DecoderFallbackBuffer))] [assembly: TypeForwardedTo(typeof(DecoderFallbackException))] [assembly: TypeForwardedTo(typeof(DecoderReplacementFallback))] [assembly: TypeForwardedTo(typeof(Encoder))] [assembly: TypeForwardedTo(typeof(EncoderExceptionFallback))] [assembly: TypeForwardedTo(typeof(EncoderFallback))] [assembly: TypeForwardedTo(typeof(EncoderFallbackBuffer))] [assembly: TypeForwardedTo(typeof(EncoderFallbackException))] [assembly: TypeForwardedTo(typeof(EncoderReplacementFallback))] [assembly: TypeForwardedTo(typeof(Encoding))] [assembly: TypeForwardedTo(typeof(EncodingProvider))]
BepInEx/plugins/Broheim-SileroTTS/System.Security.Claims.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Security.Claims; using System.Security.Principal; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Security.Claims")] [assembly: AssemblyDescription("System.Security.Claims")] [assembly: AssemblyDefaultAlias("System.Security.Claims")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.3.0")] [assembly: TypeForwardedTo(typeof(Claim))] [assembly: TypeForwardedTo(typeof(ClaimsIdentity))] [assembly: TypeForwardedTo(typeof(ClaimsPrincipal))] [assembly: TypeForwardedTo(typeof(ClaimTypes))] [assembly: TypeForwardedTo(typeof(ClaimValueTypes))] [assembly: TypeForwardedTo(typeof(GenericIdentity))] [assembly: TypeForwardedTo(typeof(GenericPrincipal))]
BepInEx/plugins/Broheim-SileroTTS/System.IO.IsolatedStorage.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.IO.IsolatedStorage; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.IO.IsolatedStorage")] [assembly: AssemblyDescription("System.IO.IsolatedStorage")] [assembly: AssemblyDefaultAlias("System.IO.IsolatedStorage")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(IsolatedStorageException))] [assembly: TypeForwardedTo(typeof(IsolatedStorageFile))] [assembly: TypeForwardedTo(typeof(IsolatedStorageFileStream))]
BepInEx/plugins/Broheim-SileroTTS/System.Runtime.Numerics.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Numerics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Runtime.Numerics")] [assembly: AssemblyDescription("System.Runtime.Numerics")] [assembly: AssemblyDefaultAlias("System.Runtime.Numerics")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(BigInteger))] [assembly: TypeForwardedTo(typeof(Complex))]
BepInEx/plugins/Broheim-SileroTTS/System.Net.WebSockets.Client.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Net.WebSockets; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Net.WebSockets.Client")] [assembly: AssemblyDescription("System.Net.WebSockets.Client")] [assembly: AssemblyDefaultAlias("System.Net.WebSockets.Client")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(ClientWebSocket))] [assembly: TypeForwardedTo(typeof(ClientWebSocketOptions))]
BepInEx/plugins/Broheim-SileroTTS/System.Security.Cryptography.X509Certificates.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Security.Cryptography.X509Certificates; using Microsoft.Win32.SafeHandles; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Security.Cryptography.X509Certificates")] [assembly: AssemblyDescription("System.Security.Cryptography.X509Certificates")] [assembly: AssemblyDefaultAlias("System.Security.Cryptography.X509Certificates")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(SafeX509ChainHandle))] [assembly: TypeForwardedTo(typeof(ECDsaCertificateExtensions))] [assembly: TypeForwardedTo(typeof(OpenFlags))] [assembly: TypeForwardedTo(typeof(PublicKey))] [assembly: TypeForwardedTo(typeof(RSACertificateExtensions))] [assembly: TypeForwardedTo(typeof(StoreLocation))] [assembly: TypeForwardedTo(typeof(StoreName))] [assembly: TypeForwardedTo(typeof(X500DistinguishedName))] [assembly: TypeForwardedTo(typeof(X500DistinguishedNameFlags))] [assembly: TypeForwardedTo(typeof(X509BasicConstraintsExtension))] [assembly: TypeForwardedTo(typeof(X509Certificate))] [assembly: TypeForwardedTo(typeof(X509Certificate2))] [assembly: TypeForwardedTo(typeof(X509Certificate2Collection))] [assembly: TypeForwardedTo(typeof(X509Certificate2Enumerator))] [assembly: TypeForwardedTo(typeof(X509CertificateCollection))] [assembly: TypeForwardedTo(typeof(X509Chain))] [assembly: TypeForwardedTo(typeof(X509ChainElement))] [assembly: TypeForwardedTo(typeof(X509ChainElementCollection))] [assembly: TypeForwardedTo(typeof(X509ChainElementEnumerator))] [assembly: TypeForwardedTo(typeof(X509ChainPolicy))] [assembly: TypeForwardedTo(typeof(X509ChainStatus))] [assembly: TypeForwardedTo(typeof(X509ChainStatusFlags))] [assembly: TypeForwardedTo(typeof(X509ContentType))] [assembly: TypeForwardedTo(typeof(X509EnhancedKeyUsageExtension))] [assembly: TypeForwardedTo(typeof(X509Extension))] [assembly: TypeForwardedTo(typeof(X509ExtensionCollection))] [assembly: TypeForwardedTo(typeof(X509ExtensionEnumerator))] [assembly: TypeForwardedTo(typeof(X509FindType))] [assembly: TypeForwardedTo(typeof(X509KeyStorageFlags))] [assembly: TypeForwardedTo(typeof(X509KeyUsageExtension))] [assembly: TypeForwardedTo(typeof(X509KeyUsageFlags))] [assembly: TypeForwardedTo(typeof(X509NameType))] [assembly: TypeForwardedTo(typeof(X509RevocationFlag))] [assembly: TypeForwardedTo(typeof(X509RevocationMode))] [assembly: TypeForwardedTo(typeof(X509Store))] [assembly: TypeForwardedTo(typeof(X509SubjectKeyIdentifierExtension))] [assembly: TypeForwardedTo(typeof(X509SubjectKeyIdentifierHashAlgorithm))] [assembly: TypeForwardedTo(typeof(X509VerificationFlags))]
BepInEx/plugins/Broheim-SileroTTS/System.Security.Cryptography.Csp.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Security.Cryptography; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Security.Cryptography.Csp")] [assembly: AssemblyDescription("System.Security.Cryptography.Csp")] [assembly: AssemblyDefaultAlias("System.Security.Cryptography.Csp")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(CspKeyContainerInfo))] [assembly: TypeForwardedTo(typeof(CspParameters))] [assembly: TypeForwardedTo(typeof(CspProviderFlags))] [assembly: TypeForwardedTo(typeof(ICspAsymmetricAlgorithm))] [assembly: TypeForwardedTo(typeof(KeyNumber))] [assembly: TypeForwardedTo(typeof(RSACryptoServiceProvider))]
BepInEx/plugins/Broheim-SileroTTS/System.Linq.Queryable.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Linq.Queryable")] [assembly: AssemblyDescription("System.Linq.Queryable")] [assembly: AssemblyDefaultAlias("System.Linq.Queryable")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(EnumerableExecutor))] [assembly: TypeForwardedTo(typeof(EnumerableExecutor<>))] [assembly: TypeForwardedTo(typeof(EnumerableQuery))] [assembly: TypeForwardedTo(typeof(EnumerableQuery<>))] [assembly: TypeForwardedTo(typeof(Queryable))]
BepInEx/plugins/Broheim-SileroTTS/Google.Protobuf.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Buffers; using System.Buffers.Binary; using System.CodeDom.Compiler; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using Google.Protobuf.WellKnownTypes; using Microsoft.CodeAnalysis; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AllowPartiallyTrustedCallers] [assembly: InternalsVisibleTo("Google.Protobuf.Test, PublicKey=002400000480000094000000060200000024000052534131000400000100010025800fbcfc63a17c66b303aae80b03a6beaa176bb6bef883be436f2a1579edd80ce23edf151a1f4ced97af83abcd981207041fd5b2da3b498346fcfcd94910d52f25537c4a43ce3fbe17dc7d43e6cbdb4d8f1242dcb6bd9b5906be74da8daa7d7280f97130f318a16c07baf118839b156299a48522f9fae2371c9665c5ae9cb6")] [assembly: InternalsVisibleTo("Google.Protobuf.Benchmarks, PublicKey=002400000480000094000000060200000024000052534131000400000100010025800fbcfc63a17c66b303aae80b03a6beaa176bb6bef883be436f2a1579edd80ce23edf151a1f4ced97af83abcd981207041fd5b2da3b498346fcfcd94910d52f25537c4a43ce3fbe17dc7d43e6cbdb4d8f1242dcb6bd9b5906be74da8daa7d7280f97130f318a16c07baf118839b156299a48522f9fae2371c9665c5ae9cb6")] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")] [assembly: AssemblyMetadata("IsTrimmable", "True")] [assembly: AssemblyCompany("Google Inc.")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCopyright("Copyright 2015, Google Inc.")] [assembly: AssemblyDescription("C# runtime library for Protocol Buffers - Google's data interchange format.")] [assembly: AssemblyFileVersion("3.21.9.0")] [assembly: AssemblyInformationalVersion("3.21.9+d96db0e9d8ef9e9c754ee1ffac58654969f3b662")] [assembly: AssemblyProduct("Google.Protobuf")] [assembly: AssemblyTitle("Google Protocol Buffers")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/protocolbuffers/protobuf.git")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("3.21.9.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] internal sealed class IsByRefLikeAttribute : Attribute { } } namespace System.Diagnostics.CodeAnalysis { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, Inherited = false)] internal sealed class DynamicallyAccessedMembersAttribute : Attribute { public DynamicallyAccessedMemberTypes MemberTypes { get; } public DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTypes memberTypes) { MemberTypes = memberTypes; } } [Flags] internal enum DynamicallyAccessedMemberTypes { None = 0, PublicParameterlessConstructor = 1, PublicConstructors = 3, NonPublicConstructors = 4, PublicMethods = 8, NonPublicMethods = 0x10, PublicFields = 0x20, NonPublicFields = 0x40, PublicNestedTypes = 0x80, NonPublicNestedTypes = 0x100, PublicProperties = 0x200, NonPublicProperties = 0x400, PublicEvents = 0x800, NonPublicEvents = 0x1000, Interfaces = 0x2000, All = -1 } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Method, Inherited = false)] internal sealed class RequiresUnreferencedCodeAttribute : Attribute { public string Message { get; } public string Url { get; set; } public RequiresUnreferencedCodeAttribute(string message) { Message = message; } } [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = true)] internal sealed class UnconditionalSuppressMessageAttribute : Attribute { public string Category { get; } public string CheckId { get; } public string Scope { get; set; } public string Target { get; set; } public string MessageId { get; set; } public string Justification { get; set; } public UnconditionalSuppressMessageAttribute(string category, string checkId) { Category = category; CheckId = checkId; } } } namespace Google.Protobuf { internal static class ByteArray { private const int CopyThreshold = 12; internal static void Copy(byte[] src, int srcOffset, byte[] dst, int dstOffset, int count) { if (count > 12) { Buffer.BlockCopy(src, srcOffset, dst, dstOffset, count); return; } int num = srcOffset + count; for (int i = srcOffset; i < num; i++) { dst[dstOffset++] = src[i]; } } internal static void Reverse(byte[] bytes) { int num = 0; int num2 = bytes.Length - 1; while (num < num2) { byte b = bytes[num]; bytes[num] = bytes[num2]; bytes[num2] = b; num++; num2--; } } } [SecuritySafeCritical] public sealed class ByteString : IEnumerable<byte>, IEnumerable, IEquatable<ByteString> { private static readonly ByteString empty = new ByteString(new byte[0]); private readonly ReadOnlyMemory<byte> bytes; public static ByteString Empty => empty; public int Length => bytes.Length; public bool IsEmpty => Length == 0; public ReadOnlySpan<byte> Span => bytes.Span; public ReadOnlyMemory<byte> Memory => bytes; public byte this[int index] => bytes.Span[index]; internal static ByteString AttachBytes(ReadOnlyMemory<byte> bytes) { return new ByteString(bytes); } internal static ByteString AttachBytes(byte[] bytes) { return AttachBytes(bytes.AsMemory()); } private ByteString(ReadOnlyMemory<byte> bytes) { this.bytes = bytes; } public byte[] ToByteArray() { return bytes.ToArray(); } public string ToBase64() { if (MemoryMarshal.TryGetArray(bytes, out var segment)) { return Convert.ToBase64String(segment.Array, segment.Offset, segment.Count); } return Convert.ToBase64String(bytes.ToArray()); } public static ByteString FromBase64(string bytes) { if (!(bytes == "")) { return new ByteString(Convert.FromBase64String(bytes)); } return Empty; } public static ByteString FromStream(Stream stream) { ProtoPreconditions.CheckNotNull(stream, "stream"); MemoryStream memoryStream = new MemoryStream(stream.CanSeek ? checked((int)(stream.Length - stream.Position)) : 0); stream.CopyTo(memoryStream); return AttachBytes(memoryStream.ToArray()); } public static Task<ByteString> FromStreamAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken)) { ProtoPreconditions.CheckNotNull(stream, "stream"); return ByteStringAsync.FromStreamAsyncCore(stream, cancellationToken); } public static ByteString CopyFrom(params byte[] bytes) { return new ByteString((byte[])bytes.Clone()); } public static ByteString CopyFrom(byte[] bytes, int offset, int count) { byte[] array = new byte[count]; ByteArray.Copy(bytes, offset, array, 0, count); return new ByteString(array); } public static ByteString CopyFrom(ReadOnlySpan<byte> bytes) { return new ByteString(bytes.ToArray()); } public static ByteString CopyFrom(string text, Encoding encoding) { return new ByteString(encoding.GetBytes(text)); } public static ByteString CopyFromUtf8(string text) { return CopyFrom(text, Encoding.UTF8); } public string ToString(Encoding encoding) { if (MemoryMarshal.TryGetArray(bytes, out var segment)) { return encoding.GetString(segment.Array, segment.Offset, segment.Count); } byte[] array = bytes.ToArray(); return encoding.GetString(array, 0, array.Length); } public string ToStringUtf8() { return ToString(Encoding.UTF8); } [SecuritySafeCritical] public IEnumerator<byte> GetEnumerator() { return MemoryMarshal.ToEnumerable(bytes).GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } public CodedInputStream CreateCodedInput() { if (MemoryMarshal.TryGetArray(bytes, out var segment) && segment.Count == bytes.Length) { return new CodedInputStream(segment.Array, segment.Offset, segment.Count); } return new CodedInputStream(bytes.ToArray()); } public static bool operator ==(ByteString lhs, ByteString rhs) { if ((object)lhs == rhs) { return true; } if ((object)lhs == null || (object)rhs == null) { return false; } return lhs.bytes.Span.SequenceEqual(rhs.bytes.Span); } public static bool operator !=(ByteString lhs, ByteString rhs) { return !(lhs == rhs); } [SecuritySafeCritical] public override bool Equals(object obj) { return this == obj as ByteString; } [SecuritySafeCritical] public override int GetHashCode() { ReadOnlySpan<byte> span = bytes.Span; int num = 23; for (int i = 0; i < span.Length; i++) { num = num * 31 + span[i]; } return num; } public bool Equals(ByteString other) { return this == other; } public void CopyTo(byte[] array, int position) { bytes.CopyTo(array.AsMemory(position)); } public void WriteTo(Stream outputStream) { if (MemoryMarshal.TryGetArray(bytes, out var segment)) { outputStream.Write(segment.Array, segment.Offset, segment.Count); return; } byte[] array = bytes.ToArray(); outputStream.Write(array, 0, array.Length); } } internal static class ByteStringAsync { internal static async Task<ByteString> FromStreamAsyncCore(Stream stream, CancellationToken cancellationToken) { int capacity = (stream.CanSeek ? checked((int)(stream.Length - stream.Position)) : 0); MemoryStream memoryStream = new MemoryStream(capacity); await stream.CopyToAsync(memoryStream, 81920, cancellationToken); return ByteString.AttachBytes((memoryStream.Length == memoryStream.Capacity) ? memoryStream.GetBuffer() : memoryStream.ToArray()); } } [SecuritySafeCritical] public sealed class CodedInputStream : IDisposable { private readonly bool leaveOpen; private readonly byte[] buffer; private readonly Stream input; private ParserInternalState state; internal const int DefaultRecursionLimit = 100; internal const int DefaultSizeLimit = int.MaxValue; internal const int BufferSize = 4096; public long Position { get { if (input != null) { return input.Position - (state.bufferSize + state.bufferSizeAfterLimit - state.bufferPos); } return state.bufferPos; } } internal uint LastTag => state.lastTag; public int SizeLimit => state.sizeLimit; public int RecursionLimit => state.recursionLimit; internal bool DiscardUnknownFields { get { return state.DiscardUnknownFields; } set { state.DiscardUnknownFields = value; } } internal ExtensionRegistry ExtensionRegistry { get { return state.ExtensionRegistry; } set { state.ExtensionRegistry = value; } } internal byte[] InternalBuffer => buffer; internal Stream InternalInputStream => input; internal ref ParserInternalState InternalState => ref state; internal bool ReachedLimit => SegmentedBufferHelper.IsReachedLimit(ref state); public bool IsAtEnd { get { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return SegmentedBufferHelper.IsAtEnd(ref readOnlySpan, ref state); } } public CodedInputStream(byte[] buffer) : this(null, ProtoPreconditions.CheckNotNull(buffer, "buffer"), 0, buffer.Length, leaveOpen: true) { } public CodedInputStream(byte[] buffer, int offset, int length) : this(null, ProtoPreconditions.CheckNotNull(buffer, "buffer"), offset, offset + length, leaveOpen: true) { if (offset < 0 || offset > buffer.Length) { throw new ArgumentOutOfRangeException("offset", "Offset must be within the buffer"); } if (length < 0 || offset + length > buffer.Length) { throw new ArgumentOutOfRangeException("length", "Length must be non-negative and within the buffer"); } } public CodedInputStream(Stream input) : this(input, leaveOpen: false) { } public CodedInputStream(Stream input, bool leaveOpen) : this(ProtoPreconditions.CheckNotNull(input, "input"), new byte[4096], 0, 0, leaveOpen) { } internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize, bool leaveOpen) { this.input = input; this.buffer = buffer; state.bufferPos = bufferPos; state.bufferSize = bufferSize; state.sizeLimit = int.MaxValue; state.recursionLimit = 100; SegmentedBufferHelper.Initialize(this, out state.segmentedBufferHelper); this.leaveOpen = leaveOpen; state.currentLimit = int.MaxValue; } internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize, int sizeLimit, int recursionLimit, bool leaveOpen) : this(input, buffer, bufferPos, bufferSize, leaveOpen) { if (sizeLimit <= 0) { throw new ArgumentOutOfRangeException("sizeLimit", "Size limit must be positive"); } if (recursionLimit <= 0) { throw new ArgumentOutOfRangeException("recursionLimit!", "Recursion limit must be positive"); } state.sizeLimit = sizeLimit; state.recursionLimit = recursionLimit; } public static CodedInputStream CreateWithLimits(Stream input, int sizeLimit, int recursionLimit) { return new CodedInputStream(input, new byte[4096], 0, 0, sizeLimit, recursionLimit, leaveOpen: false); } public void Dispose() { if (!leaveOpen) { input.Dispose(); } } internal void CheckReadEndOfStreamTag() { ParsingPrimitivesMessages.CheckReadEndOfStreamTag(ref state); } public uint PeekTag() { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return ParsingPrimitives.PeekTag(ref readOnlySpan, ref state); } public uint ReadTag() { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return ParsingPrimitives.ParseTag(ref readOnlySpan, ref state); } public void SkipLastField() { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); ParsingPrimitivesMessages.SkipLastField(ref readOnlySpan, ref state); } internal void SkipGroup(uint startGroupTag) { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); ParsingPrimitivesMessages.SkipGroup(ref readOnlySpan, ref state, startGroupTag); } public double ReadDouble() { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return ParsingPrimitives.ParseDouble(ref readOnlySpan, ref state); } public float ReadFloat() { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return ParsingPrimitives.ParseFloat(ref readOnlySpan, ref state); } public ulong ReadUInt64() { return ReadRawVarint64(); } public long ReadInt64() { return (long)ReadRawVarint64(); } public int ReadInt32() { return (int)ReadRawVarint32(); } public ulong ReadFixed64() { return ReadRawLittleEndian64(); } public uint ReadFixed32() { return ReadRawLittleEndian32(); } public bool ReadBool() { return ReadRawVarint64() != 0; } public string ReadString() { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return ParsingPrimitives.ReadString(ref readOnlySpan, ref state); } public void ReadMessage(IMessage builder) { ParseContext.Initialize(buffer.AsSpan(), ref state, out var ctx); try { ParsingPrimitivesMessages.ReadMessage(ref ctx, builder); } finally { ctx.CopyStateTo(this); } } public void ReadGroup(IMessage builder) { ParseContext.Initialize(this, out var ctx); try { ParsingPrimitivesMessages.ReadGroup(ref ctx, builder); } finally { ctx.CopyStateTo(this); } } public ByteString ReadBytes() { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return ParsingPrimitives.ReadBytes(ref readOnlySpan, ref state); } public uint ReadUInt32() { return ReadRawVarint32(); } public int ReadEnum() { return (int)ReadRawVarint32(); } public int ReadSFixed32() { return (int)ReadRawLittleEndian32(); } public long ReadSFixed64() { return (long)ReadRawLittleEndian64(); } public int ReadSInt32() { return ParsingPrimitives.DecodeZigZag32(ReadRawVarint32()); } public long ReadSInt64() { return ParsingPrimitives.DecodeZigZag64(ReadRawVarint64()); } public int ReadLength() { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return ParsingPrimitives.ParseLength(ref readOnlySpan, ref state); } public bool MaybeConsumeTag(uint tag) { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return ParsingPrimitives.MaybeConsumeTag(ref readOnlySpan, ref state, tag); } internal uint ReadRawVarint32() { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return ParsingPrimitives.ParseRawVarint32(ref readOnlySpan, ref state); } internal static uint ReadRawVarint32(Stream input) { return ParsingPrimitives.ReadRawVarint32(input); } internal ulong ReadRawVarint64() { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return ParsingPrimitives.ParseRawVarint64(ref readOnlySpan, ref state); } internal uint ReadRawLittleEndian32() { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return ParsingPrimitives.ParseRawLittleEndian32(ref readOnlySpan, ref state); } internal ulong ReadRawLittleEndian64() { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return ParsingPrimitives.ParseRawLittleEndian64(ref readOnlySpan, ref state); } internal int PushLimit(int byteLimit) { return SegmentedBufferHelper.PushLimit(ref state, byteLimit); } internal void PopLimit(int oldLimit) { SegmentedBufferHelper.PopLimit(ref state, oldLimit); } private bool RefillBuffer(bool mustSucceed) { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return state.segmentedBufferHelper.RefillBuffer(ref readOnlySpan, ref state, mustSucceed); } internal byte[] ReadRawBytes(int size) { ReadOnlySpan<byte> readOnlySpan = new ReadOnlySpan<byte>(buffer); return ParsingPrimitives.ReadRawBytes(ref readOnlySpan, ref state, size); } public void ReadRawMessage(IMessage message) { ParseContext.Initialize(this, out var ctx); try { ParsingPrimitivesMessages.ReadRawMessage(ref ctx, message); } finally { ctx.CopyStateTo(this); } } } [SecuritySafeCritical] public sealed class CodedOutputStream : IDisposable { public sealed class OutOfSpaceException : IOException { internal OutOfSpaceException() : base("CodedOutputStream was writing to a flat byte array and ran out of space.") { } } private const int LittleEndian64Size = 8; private const int LittleEndian32Size = 4; internal const int DoubleSize = 8; internal const int FloatSize = 4; internal const int BoolSize = 1; public static readonly int DefaultBufferSize = 4096; private readonly bool leaveOpen; private readonly byte[] buffer; private WriterInternalState state; private readonly Stream output; public long Position { get { if (output != null) { return output.Position + state.position; } return state.position; } } public int SpaceLeft => WriteBufferHelper.GetSpaceLeft(ref state); internal byte[] InternalBuffer => buffer; internal Stream InternalOutputStream => output; internal ref WriterInternalState InternalState => ref state; public static int ComputeDoubleSize(double value) { return 8; } public static int ComputeFloatSize(float value) { return 4; } public static int ComputeUInt64Size(ulong value) { return ComputeRawVarint64Size(value); } public static int ComputeInt64Size(long value) { return ComputeRawVarint64Size((ulong)value); } public static int ComputeInt32Size(int value) { if (value >= 0) { return ComputeRawVarint32Size((uint)value); } return 10; } public static int ComputeFixed64Size(ulong value) { return 8; } public static int ComputeFixed32Size(uint value) { return 4; } public static int ComputeBoolSize(bool value) { return 1; } public static int ComputeStringSize(string value) { int byteCount = WritingPrimitives.Utf8Encoding.GetByteCount(value); return ComputeLengthSize(byteCount) + byteCount; } public static int ComputeGroupSize(IMessage value) { return value.CalculateSize(); } public static int ComputeMessageSize(IMessage value) { int num = value.CalculateSize(); return ComputeLengthSize(num) + num; } public static int ComputeBytesSize(ByteString value) { return ComputeLengthSize(value.Length) + value.Length; } public static int ComputeUInt32Size(uint value) { return ComputeRawVarint32Size(value); } public static int ComputeEnumSize(int value) { return ComputeInt32Size(value); } public static int ComputeSFixed32Size(int value) { return 4; } public static int ComputeSFixed64Size(long value) { return 8; } public static int ComputeSInt32Size(int value) { return ComputeRawVarint32Size(WritingPrimitives.EncodeZigZag32(value)); } public static int ComputeSInt64Size(long value) { return ComputeRawVarint64Size(WritingPrimitives.EncodeZigZag64(value)); } public static int ComputeLengthSize(int length) { return ComputeRawVarint32Size((uint)length); } public static int ComputeRawVarint32Size(uint value) { if ((value & 0xFFFFFF80u) == 0) { return 1; } if ((value & 0xFFFFC000u) == 0) { return 2; } if ((value & 0xFFE00000u) == 0) { return 3; } if ((value & 0xF0000000u) == 0) { return 4; } return 5; } public static int ComputeRawVarint64Size(ulong value) { if ((value & 0xFFFFFFFFFFFFFF80uL) == 0L) { return 1; } if ((value & 0xFFFFFFFFFFFFC000uL) == 0L) { return 2; } if ((value & 0xFFFFFFFFFFE00000uL) == 0L) { return 3; } if ((value & 0xFFFFFFFFF0000000uL) == 0L) { return 4; } if ((value & 0xFFFFFFF800000000uL) == 0L) { return 5; } if ((value & 0xFFFFFC0000000000uL) == 0L) { return 6; } if ((value & 0xFFFE000000000000uL) == 0L) { return 7; } if ((value & 0xFF00000000000000uL) == 0L) { return 8; } if ((value & 0x8000000000000000uL) == 0L) { return 9; } return 10; } public static int ComputeTagSize(int fieldNumber) { return ComputeRawVarint32Size(WireFormat.MakeTag(fieldNumber, WireFormat.WireType.Varint)); } public CodedOutputStream(byte[] flatArray) : this(flatArray, 0, flatArray.Length) { } private CodedOutputStream(byte[] buffer, int offset, int length) { output = null; this.buffer = ProtoPreconditions.CheckNotNull(buffer, "buffer"); state.position = offset; state.limit = offset + length; WriteBufferHelper.Initialize(this, out state.writeBufferHelper); leaveOpen = true; } private CodedOutputStream(Stream output, byte[] buffer, bool leaveOpen) { this.output = ProtoPreconditions.CheckNotNull(output, "output"); this.buffer = buffer; state.position = 0; state.limit = buffer.Length; WriteBufferHelper.Initialize(this, out state.writeBufferHelper); this.leaveOpen = leaveOpen; } public CodedOutputStream(Stream output) : this(output, DefaultBufferSize, leaveOpen: false) { } public CodedOutputStream(Stream output, int bufferSize) : this(output, new byte[bufferSize], leaveOpen: false) { } public CodedOutputStream(Stream output, bool leaveOpen) : this(output, DefaultBufferSize, leaveOpen) { } public CodedOutputStream(Stream output, int bufferSize, bool leaveOpen) : this(output, new byte[bufferSize], leaveOpen) { } public void WriteDouble(double value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteDouble(ref span, ref state, value); } public void WriteFloat(float value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteFloat(ref span, ref state, value); } public void WriteUInt64(ulong value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteUInt64(ref span, ref state, value); } public void WriteInt64(long value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteInt64(ref span, ref state, value); } public void WriteInt32(int value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteInt32(ref span, ref state, value); } public void WriteFixed64(ulong value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteFixed64(ref span, ref state, value); } public void WriteFixed32(uint value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteFixed32(ref span, ref state, value); } public void WriteBool(bool value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteBool(ref span, ref state, value); } public void WriteString(string value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteString(ref span, ref state, value); } public void WriteMessage(IMessage value) { Span<byte> span = new Span<byte>(buffer); WriteContext.Initialize(ref span, ref state, out var ctx); try { WritingPrimitivesMessages.WriteMessage(ref ctx, value); } finally { ctx.CopyStateTo(this); } } public void WriteRawMessage(IMessage value) { Span<byte> span = new Span<byte>(buffer); WriteContext.Initialize(ref span, ref state, out var ctx); try { WritingPrimitivesMessages.WriteRawMessage(ref ctx, value); } finally { ctx.CopyStateTo(this); } } public void WriteGroup(IMessage value) { Span<byte> span = new Span<byte>(buffer); WriteContext.Initialize(ref span, ref state, out var ctx); try { WritingPrimitivesMessages.WriteGroup(ref ctx, value); } finally { ctx.CopyStateTo(this); } } public void WriteBytes(ByteString value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteBytes(ref span, ref state, value); } public void WriteUInt32(uint value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteUInt32(ref span, ref state, value); } public void WriteEnum(int value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteEnum(ref span, ref state, value); } public void WriteSFixed32(int value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteSFixed32(ref span, ref state, value); } public void WriteSFixed64(long value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteSFixed64(ref span, ref state, value); } public void WriteSInt32(int value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteSInt32(ref span, ref state, value); } public void WriteSInt64(long value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteSInt64(ref span, ref state, value); } public void WriteLength(int length) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteLength(ref span, ref state, length); } public void WriteTag(int fieldNumber, WireFormat.WireType type) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteTag(ref span, ref state, fieldNumber, type); } public void WriteTag(uint tag) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteTag(ref span, ref state, tag); } public void WriteRawTag(byte b1) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteRawTag(ref span, ref state, b1); } public void WriteRawTag(byte b1, byte b2) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteRawTag(ref span, ref state, b1, b2); } public void WriteRawTag(byte b1, byte b2, byte b3) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteRawTag(ref span, ref state, b1, b2, b3); } public void WriteRawTag(byte b1, byte b2, byte b3, byte b4) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteRawTag(ref span, ref state, b1, b2, b3, b4); } public void WriteRawTag(byte b1, byte b2, byte b3, byte b4, byte b5) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteRawTag(ref span, ref state, b1, b2, b3, b4, b5); } internal void WriteRawVarint32(uint value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteRawVarint32(ref span, ref state, value); } internal void WriteRawVarint64(ulong value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteRawVarint64(ref span, ref state, value); } internal void WriteRawLittleEndian32(uint value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteRawLittleEndian32(ref span, ref state, value); } internal void WriteRawLittleEndian64(ulong value) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteRawLittleEndian64(ref span, ref state, value); } internal void WriteRawBytes(byte[] value) { WriteRawBytes(value, 0, value.Length); } internal void WriteRawBytes(byte[] value, int offset, int length) { Span<byte> span = new Span<byte>(buffer); WritingPrimitives.WriteRawBytes(ref span, ref state, value, offset, length); } public void Dispose() { Flush(); if (!leaveOpen) { output.Dispose(); } } public void Flush() { Span<byte> span = new Span<byte>(buffer); WriteBufferHelper.Flush(ref span, ref state); } public void CheckNoSpaceLeft() { WriteBufferHelper.CheckNoSpaceLeft(ref state); } } public abstract class Extension { internal abstract System.Type TargetType { get; } public int FieldNumber { get; } internal abstract bool IsRepeated { get; } protected Extension(int fieldNumber) { FieldNumber = fieldNumber; } internal abstract IExtensionValue CreateValue(); } public sealed class Extension<TTarget, TValue> : Extension where TTarget : IExtendableMessage<TTarget> { private readonly FieldCodec<TValue> codec; internal TValue DefaultValue { get { if (codec == null) { return default(TValue); } return codec.DefaultValue; } } internal override System.Type TargetType => typeof(TTarget); internal override bool IsRepeated => false; public Extension(int fieldNumber, FieldCodec<TValue> codec) : base(fieldNumber) { this.codec = codec; } internal override IExtensionValue CreateValue() { return new ExtensionValue<TValue>(codec); } } public sealed class RepeatedExtension<TTarget, TValue> : Extension where TTarget : IExtendableMessage<TTarget> { private readonly FieldCodec<TValue> codec; internal override System.Type TargetType => typeof(TTarget); internal override bool IsRepeated => true; public RepeatedExtension(int fieldNumber, FieldCodec<TValue> codec) : base(fieldNumber) { this.codec = codec; } internal override IExtensionValue CreateValue() { return new RepeatedExtensionValue<TValue>(codec); } } public sealed class ExtensionRegistry : ICollection<Extension>, IEnumerable<Extension>, IEnumerable, IDeepCloneable<ExtensionRegistry> { internal sealed class ExtensionComparer : IEqualityComparer<Extension> { internal static ExtensionComparer Instance = new ExtensionComparer(); public bool Equals(Extension a, Extension b) { return new ObjectIntPair<System.Type>(a.TargetType, a.FieldNumber).Equals(new ObjectIntPair<System.Type>(b.TargetType, b.FieldNumber)); } public int GetHashCode(Extension a) { return new ObjectIntPair<System.Type>(a.TargetType, a.FieldNumber).GetHashCode(); } } private IDictionary<ObjectIntPair<System.Type>, Extension> extensions; public int Count => extensions.Count; bool ICollection<Extension>.IsReadOnly => false; public ExtensionRegistry() { extensions = new Dictionary<ObjectIntPair<System.Type>, Extension>(); } private ExtensionRegistry(IDictionary<ObjectIntPair<System.Type>, Extension> collection) { extensions = collection.ToDictionary((KeyValuePair<ObjectIntPair<System.Type>, Extension> k) => k.Key, (KeyValuePair<ObjectIntPair<System.Type>, Extension> v) => v.Value); } internal bool ContainsInputField(uint lastTag, System.Type target, out Extension extension) { return extensions.TryGetValue(new ObjectIntPair<System.Type>(target, WireFormat.GetTagFieldNumber(lastTag)), out extension); } public void Add(Extension extension) { ProtoPreconditions.CheckNotNull(extension, "extension"); extensions.Add(new ObjectIntPair<System.Type>(extension.TargetType, extension.FieldNumber), extension); } public void AddRange(IEnumerable<Extension> extensions) { ProtoPreconditions.CheckNotNull(extensions, "extensions"); foreach (Extension extension in extensions) { Add(extension); } } public void Clear() { extensions.Clear(); } public bool Contains(Extension item) { ProtoPreconditions.CheckNotNull(item, "item"); return extensions.ContainsKey(new ObjectIntPair<System.Type>(item.TargetType, item.FieldNumber)); } void ICollection<Extension>.CopyTo(Extension[] array, int arrayIndex) { ProtoPreconditions.CheckNotNull(array, "array"); if (arrayIndex < 0 || arrayIndex >= array.Length) { throw new ArgumentOutOfRangeException("arrayIndex"); } if (array.Length - arrayIndex < Count) { throw new ArgumentException("The provided array is shorter than the number of elements in the registry"); } foreach (Extension extension in array) { extensions.Add(new ObjectIntPair<System.Type>(extension.TargetType, extension.FieldNumber), extension); } } public IEnumerator<Extension> GetEnumerator() { return extensions.Values.GetEnumerator(); } public bool Remove(Extension item) { ProtoPreconditions.CheckNotNull(item, "item"); return extensions.Remove(new ObjectIntPair<System.Type>(item.TargetType, item.FieldNumber)); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } public ExtensionRegistry Clone() { return new ExtensionRegistry(extensions); } } public static class ExtensionSet { private static bool TryGetValue<TTarget>(ref ExtensionSet<TTarget> set, Extension extension, out IExtensionValue value) where TTarget : IExtendableMessage<TTarget> { if (set == null) { value = null; return false; } return set.ValuesByNumber.TryGetValue(extension.FieldNumber, out value); } public static TValue Get<TTarget, TValue>(ref ExtensionSet<TTarget> set, Extension<TTarget, TValue> extension) where TTarget : IExtendableMessage<TTarget> { if (TryGetValue(ref set, extension, out var value)) { if (value is ExtensionValue<TValue> extensionValue) { return extensionValue.GetValue(); } object value2 = value.GetValue(); if (value2 is TValue) { return (TValue)value2; } TypeInfo typeInfo = value.GetType().GetTypeInfo(); if (typeInfo.IsGenericType && typeInfo.GetGenericTypeDefinition() == typeof(ExtensionValue<>)) { System.Type type = typeInfo.GenericTypeArguments[0]; throw new InvalidOperationException("The stored extension value has a type of '" + type.AssemblyQualifiedName + "'. This a different from the requested type of '" + typeof(TValue).AssemblyQualifiedName + "'."); } throw new InvalidOperationException("Unexpected extension value type: " + typeInfo.AssemblyQualifiedName); } return extension.DefaultValue; } public static RepeatedField<TValue> Get<TTarget, TValue>(ref ExtensionSet<TTarget> set, RepeatedExtension<TTarget, TValue> extension) where TTarget : IExtendableMessage<TTarget> { if (TryGetValue(ref set, extension, out var value)) { if (value is RepeatedExtensionValue<TValue> repeatedExtensionValue) { return repeatedExtensionValue.GetValue(); } TypeInfo typeInfo = value.GetType().GetTypeInfo(); if (typeInfo.IsGenericType && typeInfo.GetGenericTypeDefinition() == typeof(RepeatedExtensionValue<>)) { System.Type type = typeInfo.GenericTypeArguments[0]; throw new InvalidOperationException("The stored extension value has a type of '" + type.AssemblyQualifiedName + "'. This a different from the requested type of '" + typeof(TValue).AssemblyQualifiedName + "'."); } throw new InvalidOperationException("Unexpected extension value type: " + typeInfo.AssemblyQualifiedName); } return null; } public static RepeatedField<TValue> GetOrInitialize<TTarget, TValue>(ref ExtensionSet<TTarget> set, RepeatedExtension<TTarget, TValue> extension) where TTarget : IExtendableMessage<TTarget> { IExtensionValue value; if (set == null) { value = extension.CreateValue(); set = new ExtensionSet<TTarget>(); set.ValuesByNumber.Add(extension.FieldNumber, value); } else if (!set.ValuesByNumber.TryGetValue(extension.FieldNumber, out value)) { value = extension.CreateValue(); set.ValuesByNumber.Add(extension.FieldNumber, value); } return ((RepeatedExtensionValue<TValue>)value).GetValue(); } public static void Set<TTarget, TValue>(ref ExtensionSet<TTarget> set, Extension<TTarget, TValue> extension, TValue value) where TTarget : IExtendableMessage<TTarget> { ProtoPreconditions.CheckNotNullUnconstrained(value, "value"); IExtensionValue value2; if (set == null) { value2 = extension.CreateValue(); set = new ExtensionSet<TTarget>(); set.ValuesByNumber.Add(extension.FieldNumber, value2); } else if (!set.ValuesByNumber.TryGetValue(extension.FieldNumber, out value2)) { value2 = extension.CreateValue(); set.ValuesByNumber.Add(extension.FieldNumber, value2); } ((ExtensionValue<TValue>)value2).SetValue(value); } public static bool Has<TTarget, TValue>(ref ExtensionSet<TTarget> set, Extension<TTarget, TValue> extension) where TTarget : IExtendableMessage<TTarget> { IExtensionValue value; return TryGetValue(ref set, extension, out value); } public static void Clear<TTarget, TValue>(ref ExtensionSet<TTarget> set, Extension<TTarget, TValue> extension) where TTarget : IExtendableMessage<TTarget> { if (set != null) { set.ValuesByNumber.Remove(extension.FieldNumber); if (set.ValuesByNumber.Count == 0) { set = null; } } } public static void Clear<TTarget, TValue>(ref ExtensionSet<TTarget> set, RepeatedExtension<TTarget, TValue> extension) where TTarget : IExtendableMessage<TTarget> { if (set != null) { set.ValuesByNumber.Remove(extension.FieldNumber); if (set.ValuesByNumber.Count == 0) { set = null; } } } public static bool TryMergeFieldFrom<TTarget>(ref ExtensionSet<TTarget> set, CodedInputStream stream) where TTarget : IExtendableMessage<TTarget> { ParseContext.Initialize(stream, out var ctx); try { return TryMergeFieldFrom(ref set, ref ctx); } finally { ctx.CopyStateTo(stream); } } public static bool TryMergeFieldFrom<TTarget>(ref ExtensionSet<TTarget> set, ref ParseContext ctx) where TTarget : IExtendableMessage<TTarget> { int tagFieldNumber = WireFormat.GetTagFieldNumber(ctx.LastTag); if (set != null && set.ValuesByNumber.TryGetValue(tagFieldNumber, out var value)) { value.MergeFrom(ref ctx); return true; } if (ctx.ExtensionRegistry != null && ctx.ExtensionRegistry.ContainsInputField(ctx.LastTag, typeof(TTarget), out var extension)) { IExtensionValue extensionValue = extension.CreateValue(); extensionValue.MergeFrom(ref ctx); set = set ?? new ExtensionSet<TTarget>(); set.ValuesByNumber.Add(extension.FieldNumber, extensionValue); return true; } return false; } public static void MergeFrom<TTarget>(ref ExtensionSet<TTarget> first, ExtensionSet<TTarget> second) where TTarget : IExtendableMessage<TTarget> { if (second == null) { return; } if (first == null) { first = new ExtensionSet<TTarget>(); } foreach (KeyValuePair<int, IExtensionValue> item in second.ValuesByNumber) { if (first.ValuesByNumber.TryGetValue(item.Key, out var value)) { value.MergeFrom(item.Value); continue; } IExtensionValue value2 = item.Value.Clone(); first.ValuesByNumber[item.Key] = value2; } } public static ExtensionSet<TTarget> Clone<TTarget>(ExtensionSet<TTarget> set) where TTarget : IExtendableMessage<TTarget> { if (set == null) { return null; } ExtensionSet<TTarget> extensionSet = new ExtensionSet<TTarget>(); foreach (KeyValuePair<int, IExtensionValue> item in set.ValuesByNumber) { IExtensionValue value = item.Value.Clone(); extensionSet.ValuesByNumber[item.Key] = value; } return extensionSet; } } public sealed class ExtensionSet<TTarget> where TTarget : IExtendableMessage<TTarget> { internal Dictionary<int, IExtensionValue> ValuesByNumber { get; } = new Dictionary<int, IExtensionValue>(); public override int GetHashCode() { int num = typeof(TTarget).GetHashCode(); foreach (KeyValuePair<int, IExtensionValue> item in ValuesByNumber) { int num2 = item.Key.GetHashCode() ^ item.Value.GetHashCode(); num ^= num2; } return num; } public override bool Equals(object other) { if (this == other) { return true; } ExtensionSet<TTarget> extensionSet = other as ExtensionSet<TTarget>; if (ValuesByNumber.Count != extensionSet.ValuesByNumber.Count) { return false; } foreach (KeyValuePair<int, IExtensionValue> item in ValuesByNumber) { if (!extensionSet.ValuesByNumber.TryGetValue(item.Key, out var value)) { return false; } if (!item.Value.Equals(value)) { return false; } } return true; } public int CalculateSize() { int num = 0; foreach (IExtensionValue value in ValuesByNumber.Values) { num += value.CalculateSize(); } return num; } public void WriteTo(CodedOutputStream stream) { WriteContext.Initialize(stream, out var ctx); try { WriteTo(ref ctx); } finally { ctx.CopyStateTo(stream); } } [SecuritySafeCritical] public void WriteTo(ref WriteContext ctx) { foreach (IExtensionValue value in ValuesByNumber.Values) { value.WriteTo(ref ctx); } } internal bool IsInitialized() { return ValuesByNumber.Values.All((IExtensionValue v) => v.IsInitialized()); } } internal interface IExtensionValue : IEquatable<IExtensionValue>, IDeepCloneable<IExtensionValue> { void MergeFrom(ref ParseContext ctx); void MergeFrom(IExtensionValue value); void WriteTo(ref WriteContext ctx); int CalculateSize(); bool IsInitialized(); object GetValue(); } internal sealed class ExtensionValue<T> : IExtensionValue, IEquatable<IExtensionValue>, IDeepCloneable<IExtensionValue> { private T field; private FieldCodec<T> codec; internal ExtensionValue(FieldCodec<T> codec) { this.codec = codec; field = codec.DefaultValue; } public int CalculateSize() { return codec.CalculateUnconditionalSizeWithTag(field); } public IExtensionValue Clone() { return new ExtensionValue<T>(codec) { field = ((field is IDeepCloneable<T>) ? (field as IDeepCloneable<T>).Clone() : field) }; } public bool Equals(IExtensionValue other) { if (this == other) { return true; } if (other is ExtensionValue<T> && codec.Equals((other as ExtensionValue<T>).codec)) { return object.Equals(field, (other as ExtensionValue<T>).field); } return false; } public override int GetHashCode() { return (17 * 31 + field.GetHashCode()) * 31 + codec.GetHashCode(); } public void MergeFrom(ref ParseContext ctx) { codec.ValueMerger(ref ctx, ref field); } public void MergeFrom(IExtensionValue value) { if (value is ExtensionValue<T>) { ExtensionValue<T> extensionValue = value as ExtensionValue<T>; codec.FieldMerger(ref field, extensionValue.field); } } public void WriteTo(ref WriteContext ctx) { ctx.WriteTag(codec.Tag); codec.ValueWriter(ref ctx, field); if (codec.EndTag != 0) { ctx.WriteTag(codec.EndTag); } } public T GetValue() { return field; } object IExtensionValue.GetValue() { return field; } public void SetValue(T value) { field = value; } public bool IsInitialized() { if (field is IMessage) { return (field as IMessage).IsInitialized(); } return true; } } internal sealed class RepeatedExtensionValue<T> : IExtensionValue, IEquatable<IExtensionValue>, IDeepCloneable<IExtensionValue> { private RepeatedField<T> field; private readonly FieldCodec<T> codec; internal RepeatedExtensionValue(FieldCodec<T> codec) { this.codec = codec; field = new RepeatedField<T>(); } public int CalculateSize() { return field.CalculateSize(codec); } public IExtensionValue Clone() { return new RepeatedExtensionValue<T>(codec) { field = field.Clone() }; } public bool Equals(IExtensionValue other) { if (this == other) { return true; } if (other is RepeatedExtensionValue<T> && field.Equals((other as RepeatedExtensionValue<T>).field)) { return codec.Equals((other as RepeatedExtensionValue<T>).codec); } return false; } public override int GetHashCode() { return (17 * 31 + field.GetHashCode()) * 31 + codec.GetHashCode(); } public void MergeFrom(ref ParseContext ctx) { field.AddEntriesFrom(ref ctx, codec); } public void MergeFrom(IExtensionValue value) { if (value is RepeatedExtensionValue<T>) { field.Add((value as RepeatedExtensionValue<T>).field); } } public void WriteTo(ref WriteContext ctx) { field.WriteTo(ref ctx, codec); } public RepeatedField<T> GetValue() { return field; } object IExtensionValue.GetValue() { return field; } public bool IsInitialized() { for (int i = 0; i < field.Count; i++) { T val = field[i]; if (!(val is IMessage)) { break; } if (!(val as IMessage).IsInitialized()) { return false; } } return true; } } public static class FieldCodec { private static class WrapperCodecs { private static readonly Dictionary<System.Type, object> Codecs = new Dictionary<System.Type, object> { { typeof(bool), ForBool(WireFormat.MakeTag(1, WireFormat.WireType.Varint)) }, { typeof(int), ForInt32(WireFormat.MakeTag(1, WireFormat.WireType.Varint)) }, { typeof(long), ForInt64(WireFormat.MakeTag(1, WireFormat.WireType.Varint)) }, { typeof(uint), ForUInt32(WireFormat.MakeTag(1, WireFormat.WireType.Varint)) }, { typeof(ulong), ForUInt64(WireFormat.MakeTag(1, WireFormat.WireType.Varint)) }, { typeof(float), ForFloat(WireFormat.MakeTag(1, WireFormat.WireType.Fixed32)) }, { typeof(double), ForDouble(WireFormat.MakeTag(1, WireFormat.WireType.Fixed64)) }, { typeof(string), ForString(WireFormat.MakeTag(1, WireFormat.WireType.LengthDelimited)) }, { typeof(ByteString), ForBytes(WireFormat.MakeTag(1, WireFormat.WireType.LengthDelimited)) } }; private static readonly Dictionary<System.Type, object> Readers = new Dictionary<System.Type, object> { { typeof(bool), new ValueReader<bool?>(ParsingPrimitivesWrappers.ReadBoolWrapper) }, { typeof(int), new ValueReader<int?>(ParsingPrimitivesWrappers.ReadInt32Wrapper) }, { typeof(long), new ValueReader<long?>(ParsingPrimitivesWrappers.ReadInt64Wrapper) }, { typeof(uint), new ValueReader<uint?>(ParsingPrimitivesWrappers.ReadUInt32Wrapper) }, { typeof(ulong), new ValueReader<ulong?>(ParsingPrimitivesWrappers.ReadUInt64Wrapper) }, { typeof(float), BitConverter.IsLittleEndian ? new ValueReader<float?>(ParsingPrimitivesWrappers.ReadFloatWrapperLittleEndian) : new ValueReader<float?>(ParsingPrimitivesWrappers.ReadFloatWrapperSlow) }, { typeof(double), BitConverter.IsLittleEndian ? new ValueReader<double?>(ParsingPrimitivesWrappers.ReadDoubleWrapperLittleEndian) : new ValueReader<double?>(ParsingPrimitivesWrappers.ReadDoubleWrapperSlow) }, { typeof(string), null }, { typeof(ByteString), null } }; internal static FieldCodec<T> GetCodec<T>() { if (!Codecs.TryGetValue(typeof(T), out var value)) { throw new InvalidOperationException("Invalid type argument requested for wrapper codec: " + typeof(T)); } return (FieldCodec<T>)value; } internal static ValueReader<T?> GetReader<T>() where T : struct { if (!Readers.TryGetValue(typeof(T), out var value)) { throw new InvalidOperationException("Invalid type argument requested for wrapper reader: " + typeof(T)); } if (value == null) { FieldCodec<T> nestedCoded = GetCodec<T>(); return delegate(ref ParseContext ctx) { return Read(ref ctx, nestedCoded); }; } return (ValueReader<T?>)value; } [SecuritySafeCritical] internal static T Read<T>(ref ParseContext ctx, FieldCodec<T> codec) { int byteLimit = ctx.ReadLength(); int oldLimit = SegmentedBufferHelper.PushLimit(ref ctx.state, byteLimit); T result = codec.DefaultValue; uint num; while ((num = ctx.ReadTag()) != 0) { if (num == codec.Tag) { result = codec.Read(ref ctx); } else { ParsingPrimitivesMessages.SkipLastField(ref ctx.buffer, ref ctx.state); } } ParsingPrimitivesMessages.CheckReadEndOfStreamTag(ref ctx.state); SegmentedBufferHelper.PopLimit(ref ctx.state, oldLimit); return result; } internal static void Write<T>(ref WriteContext ctx, T value, FieldCodec<T> codec) { ctx.WriteLength(codec.CalculateSizeWithTag(value)); codec.WriteTagAndValue(ref ctx, value); } internal static int CalculateSize<T>(T value, FieldCodec<T> codec) { int num = codec.CalculateSizeWithTag(value); return CodedOutputStream.ComputeLengthSize(num) + num; } } public static FieldCodec<string> ForString(uint tag) { return ForString(tag, ""); } public static FieldCodec<ByteString> ForBytes(uint tag) { return ForBytes(tag, ByteString.Empty); } public static FieldCodec<bool> ForBool(uint tag) { return ForBool(tag, defaultValue: false); } public static FieldCodec<int> ForInt32(uint tag) { return ForInt32(tag, 0); } public static FieldCodec<int> ForSInt32(uint tag) { return ForSInt32(tag, 0); } public static FieldCodec<uint> ForFixed32(uint tag) { return ForFixed32(tag, 0u); } public static FieldCodec<int> ForSFixed32(uint tag) { return ForSFixed32(tag, 0); } public static FieldCodec<uint> ForUInt32(uint tag) { return ForUInt32(tag, 0u); } public static FieldCodec<long> ForInt64(uint tag) { return ForInt64(tag, 0L); } public static FieldCodec<long> ForSInt64(uint tag) { return ForSInt64(tag, 0L); } public static FieldCodec<ulong> ForFixed64(uint tag) { return ForFixed64(tag, 0uL); } public static FieldCodec<long> ForSFixed64(uint tag) { return ForSFixed64(tag, 0L); } public static FieldCodec<ulong> ForUInt64(uint tag) { return ForUInt64(tag, 0uL); } public static FieldCodec<float> ForFloat(uint tag) { return ForFloat(tag, 0f); } public static FieldCodec<double> ForDouble(uint tag) { return ForDouble(tag, 0.0); } public static FieldCodec<T> ForEnum<T>(uint tag, Func<T, int> toInt32, Func<int, T> fromInt32) { return ForEnum(tag, toInt32, fromInt32, default(T)); } public static FieldCodec<string> ForString(uint tag, string defaultValue) { return new FieldCodec<string>(delegate(ref ParseContext ctx) { return ctx.ReadString(); }, delegate(ref WriteContext ctx, string value) { ctx.WriteString(value); }, CodedOutputStream.ComputeStringSize, tag, defaultValue); } public static FieldCodec<ByteString> ForBytes(uint tag, ByteString defaultValue) { return new FieldCodec<ByteString>(delegate(ref ParseContext ctx) { return ctx.ReadBytes(); }, delegate(ref WriteContext ctx, ByteString value) { ctx.WriteBytes(value); }, CodedOutputStream.ComputeBytesSize, tag, defaultValue); } public static FieldCodec<bool> ForBool(uint tag, bool defaultValue) { return new FieldCodec<bool>(delegate(ref ParseContext ctx) { return ctx.ReadBool(); }, delegate(ref WriteContext ctx, bool value) { ctx.WriteBool(value); }, 1, tag, defaultValue); } public static FieldCodec<int> ForInt32(uint tag, int defaultValue) { return new FieldCodec<int>(delegate(ref ParseContext ctx) { return ctx.ReadInt32(); }, delegate(ref WriteContext output, int value) { output.WriteInt32(value); }, CodedOutputStream.ComputeInt32Size, tag, defaultValue); } public static FieldCodec<int> ForSInt32(uint tag, int defaultValue) { return new FieldCodec<int>(delegate(ref ParseContext ctx) { return ctx.ReadSInt32(); }, delegate(ref WriteContext output, int value) { output.WriteSInt32(value); }, CodedOutputStream.ComputeSInt32Size, tag, defaultValue); } public static FieldCodec<uint> ForFixed32(uint tag, uint defaultValue) { return new FieldCodec<uint>(delegate(ref ParseContext ctx) { return ctx.ReadFixed32(); }, delegate(ref WriteContext output, uint value) { output.WriteFixed32(value); }, 4, tag, defaultValue); } public static FieldCodec<int> ForSFixed32(uint tag, int defaultValue) { return new FieldCodec<int>(delegate(ref ParseContext ctx) { return ctx.ReadSFixed32(); }, delegate(ref WriteContext output, int value) { output.WriteSFixed32(value); }, 4, tag, defaultValue); } public static FieldCodec<uint> ForUInt32(uint tag, uint defaultValue) { return new FieldCodec<uint>(delegate(ref ParseContext ctx) { return ctx.ReadUInt32(); }, delegate(ref WriteContext output, uint value) { output.WriteUInt32(value); }, CodedOutputStream.ComputeUInt32Size, tag, defaultValue); } public static FieldCodec<long> ForInt64(uint tag, long defaultValue) { return new FieldCodec<long>(delegate(ref ParseContext ctx) { return ctx.ReadInt64(); }, delegate(ref WriteContext output, long value) { output.WriteInt64(value); }, CodedOutputStream.ComputeInt64Size, tag, defaultValue); } public static FieldCodec<long> ForSInt64(uint tag, long defaultValue) { return new FieldCodec<long>(delegate(ref ParseContext ctx) { return ctx.ReadSInt64(); }, delegate(ref WriteContext output, long value) { output.WriteSInt64(value); }, CodedOutputStream.ComputeSInt64Size, tag, defaultValue); } public static FieldCodec<ulong> ForFixed64(uint tag, ulong defaultValue) { return new FieldCodec<ulong>(delegate(ref ParseContext ctx) { return ctx.ReadFixed64(); }, delegate(ref WriteContext output, ulong value) { output.WriteFixed64(value); }, 8, tag, defaultValue); } public static FieldCodec<long> ForSFixed64(uint tag, long defaultValue) { return new FieldCodec<long>(delegate(ref ParseContext ctx) { return ctx.ReadSFixed64(); }, delegate(ref WriteContext output, long value) { output.WriteSFixed64(value); }, 8, tag, defaultValue); } public static FieldCodec<ulong> ForUInt64(uint tag, ulong defaultValue) { return new FieldCodec<ulong>(delegate(ref ParseContext ctx) { return ctx.ReadUInt64(); }, delegate(ref WriteContext output, ulong value) { output.WriteUInt64(value); }, CodedOutputStream.ComputeUInt64Size, tag, defaultValue); } public static FieldCodec<float> ForFloat(uint tag, float defaultValue) { return new FieldCodec<float>(delegate(ref ParseContext ctx) { return ctx.ReadFloat(); }, delegate(ref WriteContext output, float value) { output.WriteFloat(value); }, 4, tag, defaultValue); } public static FieldCodec<double> ForDouble(uint tag, double defaultValue) { return new FieldCodec<double>(delegate(ref ParseContext ctx) { return ctx.ReadDouble(); }, delegate(ref WriteContext output, double value) { output.WriteDouble(value); }, 8, tag, defaultValue); } public static FieldCodec<T> ForEnum<T>(uint tag, Func<T, int> toInt32, Func<int, T> fromInt32, T defaultValue) { return new FieldCodec<T>(delegate(ref ParseContext ctx) { return fromInt32(ctx.ReadEnum()); }, delegate(ref WriteContext output, T value) { output.WriteEnum(toInt32(value)); }, (T value) => CodedOutputStream.ComputeEnumSize(toInt32(value)), tag, defaultValue); } public static FieldCodec<T> ForMessage<T>(uint tag, MessageParser<T> parser) where T : class, IMessage<T> { return new FieldCodec<T>(delegate(ref ParseContext ctx) { T val = parser.CreateTemplate(); ctx.ReadMessage(val); return val; }, delegate(ref WriteContext output, T value) { output.WriteMessage(value); }, delegate(ref ParseContext ctx, ref T v) { if (v == null) { v = parser.CreateTemplate(); } ctx.ReadMessage(v); }, delegate(ref T v, T v2) { if (v2 == null) { return false; } if (v == null) { v = v2.Clone(); } else { v.MergeFrom(v2); } return true; }, (T message) => CodedOutputStream.ComputeMessageSize(message), tag); } public static FieldCodec<T> ForGroup<T>(uint startTag, uint endTag, MessageParser<T> parser) where T : class, IMessage<T> { return new FieldCodec<T>(delegate(ref ParseContext ctx) { T val = parser.CreateTemplate(); ctx.ReadGroup(val); return val; }, delegate(ref WriteContext output, T value) { output.WriteGroup(value); }, delegate(ref ParseContext ctx, ref T v) { if (v == null) { v = parser.CreateTemplate(); } ctx.ReadGroup(v); }, delegate(ref T v, T v2) { if (v2 == null) { return v == null; } if (v == null) { v = v2.Clone(); } else { v.MergeFrom(v2); } return true; }, (T message) => CodedOutputStream.ComputeGroupSize(message), startTag, endTag); } public static FieldCodec<T> ForClassWrapper<T>(uint tag) where T : class { FieldCodec<T> nestedCodec = WrapperCodecs.GetCodec<T>(); return new FieldCodec<T>(delegate(ref ParseContext ctx) { return WrapperCodecs.Read(ref ctx, nestedCodec); }, delegate(ref WriteContext output, T value) { WrapperCodecs.Write(ref output, value, nestedCodec); }, delegate(ref ParseContext ctx, ref T v) { v = WrapperCodecs.Read(ref ctx, nestedCodec); }, delegate(ref T v, T v2) { v = v2; return v == null; }, (T value) => WrapperCodecs.CalculateSize(value, nestedCodec), tag, 0u, null); } public static FieldCodec<T?> ForStructWrapper<T>(uint tag) where T : struct { FieldCodec<T> nestedCodec = WrapperCodecs.GetCodec<T>(); return new FieldCodec<T?>(WrapperCodecs.GetReader<T>(), delegate(ref WriteContext output, T? value) { WrapperCodecs.Write(ref output, value.Value, nestedCodec); }, delegate(ref ParseContext ctx, ref T? v) { v = WrapperCodecs.Read(ref ctx, nestedCodec); }, delegate(ref T? v, T? v2) { if (v2.HasValue) { v = v2; } return v.HasValue; }, (T? value) => value.HasValue ? WrapperCodecs.CalculateSize(value.Value, nestedCodec) : 0, tag, 0u, null); } } internal delegate TValue ValueReader<out TValue>(ref ParseContext ctx); internal delegate void ValueWriter<T>(ref WriteContext ctx, T value); public sealed class FieldCodec<T> { internal delegate void InputMerger(ref ParseContext ctx, ref T value); internal delegate bool ValuesMerger(ref T value, T other); private static readonly EqualityComparer<T> EqualityComparer; private static readonly T DefaultDefault; private static readonly bool TypeSupportsPacking; private readonly int tagSize; internal bool PackedRepeatedField { get; } internal ValueWriter<T> ValueWriter { get; } internal Func<T, int> ValueSizeCalculator { get; } internal ValueReader<T> ValueReader { get; } internal InputMerger ValueMerger { get; } internal ValuesMerger FieldMerger { get; } internal int FixedSize { get; } internal uint Tag { get; } internal uint EndTag { get; } internal T DefaultValue { get; } static FieldCodec() { EqualityComparer = ProtobufEqualityComparers.GetEqualityComparer<T>(); TypeSupportsPacking = default(T) != null; if (typeof(T) == typeof(string)) { DefaultDefault = (T)(object)""; } else if (typeof(T) == typeof(ByteString)) { DefaultDefault = (T)(object)ByteString.Empty; } } internal static bool IsPackedRepeatedField(uint tag) { if (TypeSupportsPacking) { return WireFormat.GetTagWireType(tag) == WireFormat.WireType.LengthDelimited; } return false; } internal FieldCodec(ValueReader<T> reader, ValueWriter<T> writer, int fixedSize, uint tag, T defaultValue) : this(reader, writer, (Func<T, int>)((T _) => fixedSize), tag, defaultValue) { FixedSize = fixedSize; } internal FieldCodec(ValueReader<T> reader, ValueWriter<T> writer, Func<T, int> sizeCalculator, uint tag, T defaultValue) : this(reader, writer, (InputMerger)delegate(ref ParseContext ctx, ref T v) { v = reader(ref ctx); }, (ValuesMerger)delegate(ref T v, T v2) { v = v2; return true; }, sizeCalculator, tag, 0u, defaultValue) { } internal FieldCodec(ValueReader<T> reader, ValueWriter<T> writer, InputMerger inputMerger, ValuesMerger valuesMerger, Func<T, int> sizeCalculator, uint tag, uint endTag = 0u) : this(reader, writer, inputMerger, valuesMerger, sizeCalculator, tag, endTag, DefaultDefault) { } internal FieldCodec(ValueReader<T> reader, ValueWriter<T> writer, InputMerger inputMerger, ValuesMerger valuesMerger, Func<T, int> sizeCalculator, uint tag, uint endTag, T defaultValue) { ValueReader = reader; ValueWriter = writer; ValueMerger = inputMerger; FieldMerger = valuesMerger; ValueSizeCalculator = sizeCalculator; FixedSize = 0; Tag = tag; EndTag = endTag; DefaultValue = defaultValue; tagSize = CodedOutputStream.ComputeRawVarint32Size(tag); if (endTag != 0) { tagSize += CodedOutputStream.ComputeRawVarint32Size(endTag); } PackedRepeatedField = IsPackedRepeatedField(tag); } public void WriteTagAndValue(CodedOutputStream output, T value) { WriteContext.Initialize(output, out var ctx); try { WriteTagAndValue(ref ctx, value); } finally { ctx.CopyStateTo(output); } } public void WriteTagAndValue(ref WriteContext ctx, T value) { if (!IsDefault(value)) { ctx.WriteTag(Tag); ValueWriter(ref ctx, value); if (EndTag != 0) { ctx.WriteTag(EndTag); } } } public T Read(CodedInputStream input) { ParseContext.Initialize(input, out var ctx); try { return ValueReader(ref ctx); } finally { ctx.CopyStateTo(input); } } public T Read(ref ParseContext ctx) { return ValueReader(ref ctx); } public int CalculateSizeWithTag(T value) { if (!IsDefault(value)) { return ValueSizeCalculator(value) + tagSize; } return 0; } internal int CalculateUnconditionalSizeWithTag(T value) { return ValueSizeCalculator(value) + tagSize; } private bool IsDefault(T value) { return EqualityComparer.Equals(value, DefaultValue); } } internal sealed class FieldMaskTree { internal sealed class Node { public Dictionary<string, Node> Children { get; } = new Dictionary<string, Node>(); } private const char FIELD_PATH_SEPARATOR = '.'; private readonly Node root = new Node(); public FieldMaskTree() { } public FieldMaskTree(FieldMask mask) { MergeFromFieldMask(mask); } public override string ToString() { return ToFieldMask().ToString(); } public FieldMaskTree AddFieldPath(string path) { string[] array = path.Split(new char[1] { '.' }); if (array.Length == 0) { return this; } Node node = root; bool flag = false; string[] array2 = array; foreach (string key in array2) { if (!flag && node != root && node.Children.Count == 0) { return this; } if (!node.Children.TryGetValue(key, out var value)) { flag = true; value = new Node(); node.Children.Add(key, value); } node = value; } node.Children.Clear(); return this; } public FieldMaskTree MergeFromFieldMask(FieldMask mask) { foreach (string path in mask.Paths) { AddFieldPath(path); } return this; } public FieldMask ToFieldMask() { FieldMask fieldMask = new FieldMask(); if (root.Children.Count != 0) { List<string> list = new List<string>(); GetFieldPaths(root, "", list); fieldMask.Paths.AddRange(list); } return fieldMask; } private void GetFieldPaths(Node node, string path, List<string> paths) { if (node.Children.Count == 0) { paths.Add(path); return; } foreach (KeyValuePair<string, Node> child in node.Children) { string path2 = ((path.Length == 0) ? child.Key : (path + "." + child.Key)); GetFieldPaths(child.Value, path2, paths); } } public void IntersectFieldPath(string path, FieldMaskTree output) { if (root.Children.Count == 0) { return; } string[] array = path.Split(new char[1] { '.' }); if (array.Length == 0) { return; } Node value = root; string[] array2 = array; foreach (string key in array2) { if (value != root && value.Children.Count == 0) { output.AddFieldPath(path); return; } if (!value.Children.TryGetValue(key, out value)) { return; } } List<string> list = new List<string>(); GetFieldPaths(value, path, list); foreach (string item in list) { output.AddFieldPath(item); } } public void Merge(IMessage source, IMessage destination, FieldMask.MergeOptions options) { if (source.Descriptor != destination.Descriptor) { throw new InvalidProtocolBufferException("Cannot merge messages of different types."); } if (root.Children.Count != 0) { Merge(root, "", source, destination, options); } } private void Merge(Node node, string path, IMessage source, IMessage destination, FieldMask.MergeOptions options) { if (source.Descriptor != destination.Descriptor) { throw new InvalidProtocolBufferException($"source ({source.Descriptor}) and destination ({destination.Descriptor}) descriptor must be equal"); } MessageDescriptor descriptor = source.Descriptor; foreach (KeyValuePair<string, Node> child in node.Children) { FieldDescriptor fieldDescriptor = descriptor.FindFieldByName(child.Key); if (fieldDescriptor == null) { continue; } if (child.Value.Children.Count != 0) { if (fieldDescriptor.IsRepeated || fieldDescriptor.FieldType != FieldType.Message) { continue; } object value = fieldDescriptor.Accessor.GetValue(source); object obj = fieldDescriptor.Accessor.GetValue(destination); if (value != null || obj != null) { if (obj == null) { obj = fieldDescriptor.MessageType.Parser.CreateTemplate(); fieldDescriptor.Accessor.SetValue(destination, obj); } string path2 = ((path.Length == 0) ? child.Key : (path + "." + child.Key)); Merge(child.Value, path2, (IMessage)value, (IMessage)obj, options); } continue; } if (fieldDescriptor.IsRepeated) { if (options.ReplaceRepeatedFields) { fieldDescriptor.Accessor.Clear(destination); } IList obj2 = (IList)fieldDescriptor.Accessor.GetValue(source); IList list = (IList)fieldDescriptor.Accessor.GetValue(destination); foreach (object item in obj2) { list.Add(item); } continue; } object value2 = fieldDescriptor.Accessor.GetValue(source); if (fieldDescriptor.FieldType == FieldType.Message) { if (options.ReplaceMessageFields) { if (value2 == null) { fieldDescriptor.Accessor.Clear(destination); } else { fieldDescriptor.Accessor.SetValue(destination, value2); } } else if (value2 != null) { ByteString data = ((IMessage)value2).ToByteString(); IMessage message = (IMessage)fieldDescriptor.Accessor.GetValue(destination); if (message != null) { message.MergeFrom(data); } else { fieldDescriptor.Accessor.SetValue(destination, fieldDescriptor.MessageType.Parser.ParseFrom(data)); } } } else if (value2 != null || !options.ReplacePrimitiveFields) { fieldDescriptor.Accessor.SetValue(destination, value2); } else { fieldDescriptor.Accessor.Clear(destination); } } } } internal static class FrameworkPortability { internal static readonly RegexOptions CompiledRegexWhereAvailable = (System.Enum.IsDefined(typeof(RegexOptions), 8) ? RegexOptions.Compiled : RegexOptions.None); } public interface IBufferMessage : IMessage { void InternalMergeFrom(ref ParseContext ctx); void InternalWriteTo(ref WriteContext ctx); } public interface ICustomDiagnosticMessage : IMessage { string ToDiagnosticString(); } public interface IDeepCloneable<T> { T Clone(); } public interface IExtendableMessage<T> : IMessage<T>, IMessage, IEquatable<T>, IDeepCloneable<T> where T : IExtendableMessage<T> { TValue GetExtension<TValue>(Extension<T, TValue> extension); RepeatedField<TValue> GetExtension<TValue>(RepeatedExtension<T, TValue> extension); RepeatedField<TValue> GetOrInitializeExtension<TValue>(RepeatedExtension<T, TValue> extension); void SetExtension<TValue>(Extension<T, TValue> extension, TValue value); bool HasExtension<TValue>(Extension<T, TValue> extension); void ClearExtension<TValue>(Extension<T, TValue> extension); void ClearExtension<TValue>(RepeatedExtension<T, TValue> extension); } public interface IMessage { MessageDescriptor Descriptor { get; } void MergeFrom(CodedInputStream input); void WriteTo(CodedOutputStream output); int CalculateSize(); } public interface IMessage<T> : IMessage, IEquatable<T>, IDeepCloneable<T> where T : IMessage<T> { void MergeFrom(T message); } public sealed class InvalidJsonException : IOException { internal InvalidJsonException(string message) : base(message) { } } public sealed class InvalidProtocolBufferException : IOException { internal InvalidProtocolBufferException(string message) : base(message) { } internal InvalidProtocolBufferException(string message, Exception innerException) : base(message, innerException) { } internal static InvalidProtocolBufferException MoreDataAvailable() { return new InvalidProtocolBufferException("Completed reading a message while more data was available in the stream."); } internal static InvalidProtocolBufferException TruncatedMessage() { return new InvalidProtocolBufferException("While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either that the input has been truncated or that an embedded message misreported its own length."); } internal static InvalidProtocolBufferException NegativeSize() { return new InvalidProtocolBufferException("CodedInputStream encountered an embedded string or message which claimed to have negative size."); } internal static InvalidProtocolBufferException MalformedVarint() { return new InvalidProtocolBufferException("CodedInputStream encountered a malformed varint."); } internal static InvalidProtocolBufferException InvalidTag() { return new InvalidProtocolBufferException("Protocol message contained an invalid tag (zero)."); } internal static InvalidProtocolBufferException InvalidWireType() { return new InvalidProtocolBufferException("Protocol message contained a tag with an invalid wire type."); } internal static InvalidProtocolBufferException InvalidBase64(Exception innerException) { return new InvalidProtocolBufferException("Invalid base64 data", innerException); } internal static InvalidProtocolBufferException InvalidEndTag() { return new InvalidProtocolBufferException("Protocol message end-group tag did not match expected tag."); } internal static InvalidProtocolBufferException RecursionLimitExceeded() { return new InvalidProtocolBufferException("Protocol message had too many levels of nesting. May be malicious. Use CodedInputStream.SetRecursionLimit() to increase the depth limit."); } internal static InvalidProtocolBufferException JsonRecursionLimitExceeded() { return new InvalidProtocolBufferException("Protocol message had too many levels of nesting. May be malicious. Use JsonParser.Settings to increase the depth limit."); } internal static InvalidProtocolBufferException SizeLimitExceeded() { return new InvalidProtocolBufferException("Protocol message was too large. May be malicious. Use CodedInputStream.SetSizeLimit() to increase the size limit."); } internal static InvalidProtocolBufferException InvalidMessageStreamTag() { return new InvalidProtocolBufferException("Stream of protocol messages had invalid tag. Expected tag is length-delimited field 1."); } internal static InvalidProtocolBufferException MissingFields() { return new InvalidProtocolBufferException("Message was missing required fields"); } } public sealed class JsonFormatter { public sealed class Settings { public static Settings Default { get; } public bool FormatDefaultValues { get; } public TypeRegistry TypeRegistry { get; } public bool FormatEnumsAsIntegers { get; } public bool PreserveProtoFieldNames { get; } static Settings() { Default = new Settings(formatDefaultValues: false); } public Settings(bool formatDefaultValues) : this(formatDefaultValues, TypeRegistry.Empty) { } public Settings(bool formatDefaultValues, TypeRegistry typeRegistry) : this(formatDefaultValues, typeRegistry, formatEnumsAsIntegers: false, preserveProtoFieldNames: false) { } private Settings(bool formatDefaultValues, TypeRegistry typeRegistry, bool formatEnumsAsIntegers, bool preserveProtoFieldNames) { FormatDefaultValues = formatDefaultValues; TypeRegistry = typeRegistry ?? TypeRegistry.Empty; FormatEnumsAsIntegers = formatEnumsAsIntegers; PreserveProtoFieldNames = preserveProtoFieldNames; } public Settings WithFormatDefaultValues(bool formatDefaultValues) { return new Settings(formatDefaultValues, TypeRegistry, FormatEnumsAsIntegers, PreserveProtoFieldNames); } public Settings WithTypeRegistry(TypeRegistry typeRegistry) { return new Settings(FormatDefaultValues, typeRegistry, FormatEnumsAsIntegers, PreserveProtoFieldNames); } public Settings WithFormatEnumsAsIntegers(bool formatEnumsAsIntegers) { return new Settings(FormatDefaultValues, TypeRegistry, formatEnumsAsIntegers, PreserveProtoFieldNames); } public Settings WithPreserveProtoFieldNames(bool preserveProtoFieldNames) { return new Settings(FormatDefaultValues, TypeRegistry, FormatEnumsAsIntegers, preserveProtoFieldNames); } } private static class OriginalEnumValueHelper { private static readonly Dictionary<System.Type, Dictionary<object, string>> dictionaries = new Dictionary<System.Type, Dictionary<object, string>>(); [UnconditionalSuppressMessage("Trimming", "IL2072", Justification = "The field for the value must still be present. It will be returned by reflection, will be in this collection, and its name can be resolved.")] internal static string GetOriginalName(object value) { System.Type type = value.GetType(); Dictionary<object, string> value2; lock (dictionaries) { if (!dictionaries.TryGetValue(type, out value2)) { value2 = GetNameMapping(type); dictionaries[type] = value2; } } value2.TryGetValue(value, out var value3); return value3; } private static Dictionary<object, string> GetNameMapping([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields)] System.Type enumType) { return (from f in enumType.GetTypeInfo().DeclaredFields where f.IsStatic where f.GetCustomAttributes<OriginalNameAttribute>().FirstOrDefault()?.PreferredAlias ?? true select f).ToDictionary((FieldInfo f) => f.GetValue(null), (FieldInfo f) => f.GetCustomAttributes<OriginalNameAttribute>().FirstOrDefault()?.Name ?? f.Name); } } internal const string AnyTypeUrlField = "@type"; internal const string AnyDiagnosticValueField = "@value"; internal const string AnyWellKnownTypeValueField = "value"; private const string TypeUrlPrefix = "type.googleapis.com"; private const string NameValueSeparator = ": "; private const string PropertySeparator = ", "; private static readonly JsonFormatter diagnosticFormatter; private static readonly string[] CommonRepresentations; private readonly Settings settings; private const string Hex = "0123456789abcdef"; public static JsonFormatter Default { get; } private bool DiagnosticOnly => this == diagnosticFormatter; static JsonFormatter() { Default = new JsonFormatter(Settings.Default); diagnosticFormatter = new JsonFormatter(Settings.Default); CommonRepresentations = new string[160] { "\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004", "\\u0005", "\\u0006", "\\u0007", "\\b", "\\t", "\\n", "\\u000b", "\\f", "\\r", "\\u000e", "\\u000f", "\\u0010", "\\u0011", "\\u0012", "\\u0013", "\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018", "\\u0019", "\\u001a", "\\u001b", "\\u001c", "\\u001d", "\\u001e", "\\u001f", "", "", "\\\"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "\\u003c", "", "\\u003e", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "\\\\", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "\\u007f", "\\u0080", "\\u0081", "\\u0082", "\\u0083", "\\u0084", "\\u0085", "\\u0086", "\\u0087", "\\u0088", "\\u0089", "\\u008a", "\\u008b", "\\u008c", "\\u008d", "\\u008e", "\\u008f", "\\u0090", "\\u0091", "\\u0092", "\\u0093", "\\u0094", "\\u0095", "\\u0096", "\\u0097", "\\u0098", "\\u0099", "\\u009a", "\\u009b", "\\u009c", "\\u009d", "\\u009e", "\\u009f" }; for (int i = 0; i < CommonRepresentations.Length; i++) { if (CommonRepresentations[i] == "") { CommonRepresentations[i] = ((char)i).ToString(); } } } public JsonFormatter(Settings settings) { this.settings = ProtoPreconditions.CheckNotNull(settings, "settings"); } public string Format(IMessage message) { StringWriter stringWriter = new StringWriter(); Format(message, stringWriter); return stringWriter.ToString(); } public void Format(IMessage message, TextWriter writer) { ProtoPreconditions.CheckNotNull(message, "message"); ProtoPreconditions.CheckNotNull(writer, "writer"); if (message.Descriptor.IsWellKnownType) { WriteWellKnownTypeValue(writer, message.Descriptor, message); } else { WriteMessage(writer, message); } } public static string ToDiagnosticString(IMessage message) { ProtoPreconditions.CheckNotNull(message, "message"); return diagnosticFormatter.Format(message); } private void WriteMessage(TextWriter writer, IMessage message) { if (message == null) { WriteNull(writer); return; } if (DiagnosticOnly && message is ICustomDiagnosticMessage customDiagnosticMessage) { writer.Write(customDiagnosticMessage.ToDiagnosticString()); return; } writer.Write("{ "); bool flag = WriteMessageFields(writer, message, assumeFirstFieldWritten: false); writer.Write(flag ? " }" : "}"); } private bool WriteMessageFields(TextWriter writer, IMessage message, bool assumeFirstFieldWritten) { MessageDescriptor.FieldCollection fields = message.Descriptor.Fields; bool flag = !assumeFirstFieldWritten; foreach (FieldDescriptor item in fields.InFieldNumberOrder()) { IFieldAccessor accessor = item.Accessor; object value = accessor.GetValue(message); if (ShouldFormatFieldValue(message, item, value)) { if (!flag) { writer.Write(", "); } if (settings.PreserveProtoFieldNames) { WriteString(writer, accessor.Descriptor.Name); } else { WriteString(writer, accessor.Descriptor.JsonName); } writer.Write(": "); WriteValue(writer, value); flag = false; } } return !flag; } private bool ShouldFormatFieldValue(IMessage message, FieldDescriptor field, object value) { if (!field.HasPresence) { if (!settings.FormatDefaultValues) { return !IsDefaultValue(field, value); } return true; } return field.Accessor.HasValue(message); } internal static string ToJsonName(string name) { StringBuilder stringBuilder = new StringBuilder(name.Length); bool flag = false; foreach (char c in name) { if (c == '_') { flag = true; } else if (flag) { stringBuilder.Append(char.ToUpperInvariant(c)); flag = false; } else { stringBuilder.Append(c); } } return stringBuilder.ToString(); } internal static string FromJsonName(string name) { StringBuilder stringBuilder = new StringBuilder(name.Length); foreach (char c in name) { if (char.IsUpper(c)) { stringBuilder.Append('_'); stringBuilder.Append(char.ToLowerInvariant(c)); } else { stringBuilder.Append(c); } } return stringBuilder.ToString(); } private static void WriteNull(TextWriter writer) { writer.Write("null"); } private static bool IsDefaultValue(FieldDescriptor descriptor, object value) { if (descriptor.IsMap) { return ((IDictionary)value).Count == 0; } if (descriptor.IsRepeated) { return ((IList)value).Count == 0; } switch (descriptor.FieldType) { case FieldType.Bool: return !(bool)value; case FieldType.Bytes: return (ByteString)value == ByteString.Empty; case FieldType.String: return (string)value == ""; case FieldType.Double: return (double)value == 0.0; case FieldType.Int32: case FieldType.SFixed32: case FieldType.SInt32: case FieldType.Enum: return (int)value == 0; case FieldType.Fixed32: case FieldType.UInt32: return (uint)value == 0; case FieldType.UInt64: case FieldType.Fixed64: return (ulong)value == 0; case FieldType.Int64: case FieldType.SFixed64: case FieldType.SInt64: return (long)value == 0; case FieldType.Float: return (float)value == 0f; case FieldType.Group: case FieldType.Message: return value == null; default: throw new ArgumentException("Invalid field type"); } } public void WriteValue(TextWriter writer, object value) { if (value == null || value is NullValue) { WriteNull(writer); } else if (value is bool) { writer.Write(((bool)value) ? "true" : "false"); } else if (value is ByteString) { writer.Write('"'); writer.Write(((ByteString)value).ToBase64()); writer.Write('"'); } else if (value is string) { WriteString(writer, (string)value); } else if (value is IDictionary) { WriteDictionary(writer, (IDictionary)value); } else if (value is IList) { WriteList(writer, (IList)value); } else if (value is int || value is uint) { IFormattable formattable = (IFormattable)value; writer.Write(formattable.ToString("d", CultureInfo.InvariantCulture)); } else if (value is long || value is ulong) { writer.Write('"'); IFormattable formattable2 = (IFormattable)value; writer.Write(formattable2.ToString("d", CultureInfo.InvariantCulture)); writer.Write('"'); } else if (value is System.Enum) { if (settings.FormatEnumsAsIntegers) { WriteValue(writer, (int)value); return; } string originalName = OriginalEnumValueHelper.GetOriginalName(value); if (originalName != null) { WriteString(writer, originalName); } else { WriteValue(writer, (int)value); } } else if (value is float || value is double) { string text = ((IFormattable)value).ToString("r", CultureInfo.InvariantCulture); switch (text) { case "NaN": case "Infinity": case "-Infinity": writer.Write('"'); writer.Write(text); writer.Write('"'); break; default: writer.Write(text); break; } } else { if (!(value is IMessage)) { throw new ArgumentException("Unable to format value of type " + value.GetType()); } Format((IMessage)value, writer); } } private void WriteWellKnownTypeValue(TextWriter writer, MessageDescriptor descriptor, object value) { if (value == null) { WriteNull(writer); } else if (descriptor.IsWrapperType) { if (value is IMessage) { IMessage message = (IMessage)value; value = message.Descriptor.Fields[1].Accessor.GetValue(message); } WriteValue(writer, value); } else if (descriptor.FullName == Timestamp.Descriptor.FullName) { WriteTimestamp(writer, (IMessage)value); } else if (descriptor.FullName == Duration.Descriptor.FullName) { WriteDuration(writer, (IMessage)value); } else if (descriptor.FullName == FieldMask.Descriptor.FullName) { WriteFieldMask(writer, (IMessage)value); } else if (descriptor.FullName == Struct.Descriptor.FullName) { WriteStruct(writer, (IMessage)value); } else if (descriptor.FullName == ListValue.Descriptor.FullName) { IFieldAccessor accessor = descriptor.Fields[1].Accessor; WriteList(writer, (IList)accessor.GetValue((IMessage)value)); } else if (descriptor.FullName == Value.Descriptor.FullName) { WriteStructFieldValue(writer, (IMessage)value); } else if (descriptor.FullName == Any.Descriptor.FullName) { WriteAny(writer, (IMessage)value); } else { WriteMessage(writer, (IMessage)value); } } private void WriteTimestamp(TextWriter writer, IMessage value) { int nanoseconds = (int)value.Descriptor.Fields[2].Accessor.GetValue(value); long seconds = (long)value.Descriptor.Fields[1].Accessor.GetValue(value); writer.Write(Timestamp.ToJson(seconds, nanoseconds, DiagnosticOnly)); } private void WriteDuration(TextWriter writer, IMessage value) { int nanoseconds = (int)value.Descriptor.Fields[2].Accessor.GetValue(value); long seconds = (long)value.Descriptor.Fields[1].Accessor.GetValue(value); writer.Write(Duration.ToJson(seconds, nanoseconds, DiagnosticOnly)); } private void WriteFieldMask(TextWriter writer, IMessage value) { IList<string> paths = (IList<string>)value.Descriptor.Fields[1].Accessor.GetValue(value); writer.Write(FieldMask.ToJson(paths, DiagnosticOnly)); } private void WriteAny(TextWriter writer, IMessage value) { if (DiagnosticOnly) { WriteDiagnosticOnlyAny(writer, value); return; } string text = (string)value.Descriptor.Fields[1].Accessor.GetValue(value); ByteString data = (ByteString)value.Descriptor.Fields[2].Accessor.GetValue(value); string typeName = Any.GetTypeName(text); MessageDescriptor messageDescriptor = settings.TypeRegistry.Find(typeName); if (messageDescriptor == null) { throw new InvalidOperationException("Type registry has no descriptor for type name '" + typeName + "'"); } IMessage message = messageDescriptor.Parser.ParseFrom(data); writer.Write("{ "); WriteString(writer, "@type"); writer.Write(": "); WriteString(writer, text); if (messageDescriptor.IsWellKnownType) { writer.Write(", "); WriteString(writer, "value"); writer.Write(": "); WriteWellKnownTypeValue(writer, messageDescriptor, message); } else { WriteMessageFields(writer, message, assumeFirstFieldWritten: true); } writer.Write(" }"); } private void WriteDiagnosticOnlyAny(TextWriter writer, IMessage value) { string text = (string)value.Descriptor.Fields[1].Accessor.GetValue(value); ByteString byteString = (ByteString)value.Descriptor.Fields[2].Accessor.GetValue(value); writer.Write("{ "); WriteString(writer, "@type"); writer.Write(": "); WriteString(writer, text); writer.Write(", "); WriteString(writer, "@value"); writer.Write(": "); writer.Write('"'); writer.Write(byteString.ToBase64()); writer.Write('"'); writer.Write(" }"); } private void WriteStruct(TextWriter writer, IMessage message) { writer.Write("{ "); IDictionary obj = (IDictionary)message.Descriptor.Fields[1].Accessor.GetValue(message); bool flag = true; foreach (DictionaryEntry item in obj) { string text = (string)item.Key; IMessage message2 = (IMessage)item.Value; if (string.IsNullOrEmpty(text) || message2 == null) { throw new InvalidOperationException("Struct fields cannot have an empty key or a null value."); } if (!flag) { writer.Write(", "); } WriteString(writer, text); writer.Write(": "); WriteStructFieldValue(writer, message2); flag = false; } writer.Write(flag ? "}" : " }"); } private void WriteStructFieldValue(TextWriter writer, IMessage message) { FieldDescriptor caseFieldDescriptor = message.Descriptor.Oneofs[0].Accessor.GetCaseFieldDescriptor(message); if (caseFieldDescriptor == null) { throw new InvalidOperationException("Value message must contain a value for the oneof."); } object value = caseFieldDescriptor.Accessor.GetValue(message); switch (caseFieldDescriptor.FieldNumber) { case 2: case 3: case 4: WriteValue(writer, value); break; case 5: case 6: { IMessage message2 = (IMessage)caseFieldDescriptor.Accessor.GetValue(message); WriteWellKnownTypeValue(writer, message2.Descriptor, message2); break; } case 1: WriteNull(writer); break; default: throw new InvalidOperationException("Unexpected case in struct field: " + caseFieldDescriptor.FieldNumber); } } internal void WriteList(TextWriter writer, IList list) { writer.Write("[ "); bool flag = true; foreach (object item in list) { if (!flag) { writer.Write(", "); } WriteValue(writer, item); flag = false; } writer.Write(flag ? "]" : " ]"); } internal void WriteDictionary(TextWriter writer, IDictionary dictionary) { writer.Write("{ "); bool flag = true; foreach (DictionaryEntry item in dictionary) { if (!flag) { writer.Write(", "); } string text; if (item.Key is string) { text = (string)item.Key; } else if (item.Key is bool) { text = (((bool)item.Key) ? "true" : "false"); } else { if (!(item.Key is int) && !((item.Key is uint) | (item.Key is long)) && !(item.Key is ulong)) { if (item.Key == null) { throw new ArgumentException("Dictionary has entry with null key"); } throw new ArgumentException("Unhandled dictionary key type: " + item.Key.GetType()); } text = ((IFormattable)item.Key).ToString("d", CultureInfo.InvariantCulture); } WriteString(writer, text); writer.Write(": "); WriteValue(writer, item.Value); flag = false; } writer.Write(flag ? "}" : " }"); } internal static void WriteString(TextWriter writer, string text) { writer.Write('"'); for (int i = 0; i < text.Length; i++) { char c = text[i]; if (c < '\u00a0') { writer.Write(CommonRepresentations[(uint)c]); continue; } if (char.IsHighSurrogate(c)) { i++; if (i == text.Length || !char.IsLowSurrogate(text[i])) { throw new ArgumentException("String contains low surrogate not followed by high surrogate"); } HexEncodeUtf16CodeUnit(writer, c); HexEncodeUtf16CodeUnit(writer, text[i]); continue; } if (char.IsLowSurrogate(c)) { throw new ArgumentException("String contains high surrogate not preceded by low surrogate"); } switch (c) { case 173u: case 1757u: case 1807u: case 6068u: case 6069u: case 65279u: case 65529u: case 65530u: case 65531u: HexEncodeUtf16CodeUnit(writer, c); continue; } if ((c >= '\u0600' && c <= '\u0603') || (c >= '\u200b' && c <= '\u200f') || (c >= '\u2028' && c <= '\u202e') || (c >= '\u2060' && c <= '\u2064') || (c >= '\u206a' && c <= '\u206f')) { HexEncodeUtf16CodeUnit(writer, c); } else { writer.Write(c); } } writer.Write('"'); } private static void HexEncodeUtf16CodeUnit(TextWriter writer, char c) { writer.Write("\\u"); writer.Write("0123456789abcdef"[((int)c >> 12) & 0xF]); writer.Write("0123456789abcdef"[((int)c >> 8) & 0xF]); writer.Write("0123456789abcdef"[((int)c >> 4) & 0xF]); writer.Write("0123456789abcdef"[c & 0xF]); } } public sealed class JsonParser { public sealed class Settings { public static Settings Default { get; } public int RecursionLimit { get; } public TypeRegistry TypeRegistry { get; } public bool IgnoreUnknownFields { get; } static Settings() { Default = new Settings(100); } private Settings(int recursionLimit, TypeRegistry typeRegistry, bool ignoreUnknownFields) { RecursionLimit = recursionLimit; TypeRegistry = ProtoPreconditions.CheckNotNull(typeRegistry, "typeRegistry"); IgnoreUnknownFields = ignoreUnknownFields; } public Settings(int recursionLimit) : this(recursionLimit, TypeRegistry.Empty) { } public Settings(int recursionLimit, TypeRegistry typeRegistry) : this(recursionLimit, typeRegistry, ignoreUnknownFields: false) { } public Settings WithIgnoreUnknownFields(bool ignoreUnknownFields) { return new Settings(RecursionLimit, TypeRegistry, ignoreUnknownFields); } public Settings WithRecursionLimit(int recursionLimit) { return new Settings(recursionLimit, TypeRegistry, IgnoreUnknownFields); } public Settings WithTypeRegistry(TypeRegistry typeRegistry) { return new Settings(RecursionLimit, ProtoPreconditions.CheckNotNull(typeRegistry, "typeRegistry"), IgnoreUnknownFields); } } private static readonly Regex TimestampRegex = new Regex("^(?<datetime>[0-9]{4}-[01][0-9]-[0-3][0-9]T[012][0-9]:[0-5][0-9]:[0-5][0-9])(?<subseconds>\\.[0-9]{1,9})?(?<offset>(Z|[+-][0-1][0-9]:[0-5][0-9]))$", FrameworkPortability.CompiledRegexWhereAvailable); private static readonly Regex DurationRegex = new Regex("^(?<sign>-)?(?<int>[0-9]{1,12})(?<subseconds>\\.[0-9]{1,9})?s$", FrameworkPortability.CompiledRegexWhereAvailable); private static readonly int[] SubsecondScalingFactors = new int[11] { 0, 100000000, 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10, 1 }; private static readonly char[] FieldMaskPathSeparators = new char[1] { ',' }; private static readonly EnumDescriptor NullValueDescriptor = StructReflection.Descriptor.EnumTypes.Single((EnumDescriptor ed) => ed.ClrType == typeof(NullValue)); private static readonly JsonParser defaultInstance = new JsonParser(Settings.Default); private static readonly Dictionary<string, Action<JsonParser, IMessage, JsonTokenizer>> WellKnownTypeHandlers = new Dictionary<string, Action<JsonParser, IMessage, JsonTokenizer>> { { Timestamp.Descriptor.FullName, delegate(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { MergeTimestamp(message, tokenizer.Next()); } }, { Duration.Descriptor.FullName, delegate(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { MergeDuration(message, tokenizer.Next()); } }, { Value.Descriptor.FullName, delegate(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { parser.MergeStructValue(message, tokenizer); } }, { ListValue.Descriptor.FullName, delegate(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { parser.MergeRepeatedField(message, message.Descriptor.Fields[1], tokenizer); } }, { Struct.Descriptor.FullName, delegate(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { parser.MergeStruct(message, tokenizer); } }, { Any.Descriptor.FullName, delegate(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { parser.MergeAny(message, tokenizer); } }, { FieldMask.Descriptor.FullName, delegate(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { MergeFieldMask(message, tokenizer.Next()); } }, { Int32Value.Descriptor.FullName, MergeWrapperField }, { Int64Value.Descriptor.FullName, MergeWrapperField }, { UInt32Value.Descriptor.FullName, MergeWrapperField }, { UInt64Value.Descriptor.FullName, MergeWrapperField }, { FloatValue.Descriptor.FullName, MergeWrapperField }, { DoubleValue.Descriptor.FullName, MergeWrapperField }, { BytesValue.Descriptor.FullName, MergeWrapperField }, { StringValue.Descriptor.FullName, MergeWrapperField }, { BoolValue.Descriptor.FullName, MergeWrapperField } }; private readonly Settings settings; public static JsonParser Default => defaultInstance; private static void MergeWrapperField(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { parser.MergeField(message, message.Descriptor.Fields[1], tokenizer); } public JsonParser(Settings settings) { this.settings = ProtoPreconditions.CheckNotNull(settings, "settings"); } internal void Merge(IMessage message, string json) { Merge(message, new StringReader(json)); } internal void Merge(IMessage message, TextReader jsonReader) { JsonTokenizer jsonTokenizer = JsonTokenizer.FromTextReader(jsonReader); Merge(message, jsonTokenizer); if (jsonTokenizer.Next() != JsonToken.EndDocument) { throw new InvalidProtocolBufferException("Expected end of JSON after object"); } } private void Merge(IMessage message, JsonTokenizer tokenizer) { if (tokenizer.ObjectDepth > settings.RecursionLimit) { throw InvalidProtocolBufferException.JsonRecursionLimitExceeded(); } if (message.Descriptor.IsWellKnownType && WellKnownTypeHandlers.TryGetValue(message.Descriptor.FullName, out var value)) { value(this, message, tokenizer); return; } JsonToken jsonToken = tokenizer.Next(); if (jsonToken.Type != JsonToken.TokenType.StartObject) { throw new InvalidProtocolBufferException("Expected an object"); } IDictionary<string, FieldDescriptor> dictionary = message.Descriptor.Fields.ByJsonName(); HashSet<OneofDescriptor> hashSet = null; string stringValue; while (true) { jsonToken = tokenizer.Next(); if (jsonToken.Type == JsonToken.TokenType.EndObject) { return; } if (jsonToken.Type != JsonToken.TokenType.Name) { throw new InvalidOperationException("Unexpected token type " + jsonToken.Type); } stringValue = jsonToken.StringValue; if (dictionary.TryGetValue(stringValue, out var value2)) { if (value2.ContainingOneof != null) { if (hashSet == null) { hashSet = new HashSet<OneofDescriptor>(); } if (!hashSet.Add(value2.ContainingOneof)) { throw new InvalidProtocolBufferException("Multiple values specified for oneof " + value2.ContainingOneof.Name); } } MergeField(message, value2, tokenizer); } else { if (!settings.IgnoreUnknownFields) { break; } tokenizer.SkipValue(); } } throw new InvalidProtocolBufferException("Unknown field: " + stringValue); } private void MergeField(IMessage message, FieldDescriptor field, JsonTokenizer tokenizer) { JsonToken jsonToken = tokenizer.Next(); if (jsonToken.Type == JsonToken.TokenType.Null && (field.IsMap || field.IsRepeated || (!IsGoogleProtobufValueField(field) && !IsGoogleProtobufNullValueField(field)))) { field.Accessor.Clear(message); return; } tokeniz
BepInEx/plugins/Broheim-SileroTTS/System.Collections.Specialized.dll
Decompiled 2 days agousing System; using System.Collections.Specialized; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Collections.Specialized")] [assembly: AssemblyDescription("System.Collections.Specialized")] [assembly: AssemblyDefaultAlias("System.Collections.Specialized")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.3.0")] [assembly: TypeForwardedTo(typeof(BitVector32))] [assembly: TypeForwardedTo(typeof(HybridDictionary))] [assembly: TypeForwardedTo(typeof(IOrderedDictionary))] [assembly: TypeForwardedTo(typeof(ListDictionary))] [assembly: TypeForwardedTo(typeof(NameObjectCollectionBase))] [assembly: TypeForwardedTo(typeof(NameValueCollection))] [assembly: TypeForwardedTo(typeof(OrderedDictionary))] [assembly: TypeForwardedTo(typeof(StringCollection))] [assembly: TypeForwardedTo(typeof(StringDictionary))] [assembly: TypeForwardedTo(typeof(StringEnumerator))]
BepInEx/plugins/Broheim-SileroTTS/System.IO.UnmanagedMemoryStream.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.IO.UnmanagedMemoryStream")] [assembly: AssemblyDescription("System.IO.UnmanagedMemoryStream")] [assembly: AssemblyDefaultAlias("System.IO.UnmanagedMemoryStream")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.3.0")] [assembly: TypeForwardedTo(typeof(UnmanagedMemoryAccessor))] [assembly: TypeForwardedTo(typeof(UnmanagedMemoryStream))]
BepInEx/plugins/Broheim-SileroTTS/Microsoft.Win32.Primitives.dll
Decompiled 2 days agousing System; using System.ComponentModel; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("Microsoft.Win32.Primitives")] [assembly: AssemblyDescription("Microsoft.Win32.Primitives")] [assembly: AssemblyDefaultAlias("Microsoft.Win32.Primitives")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.3.0")] [assembly: TypeForwardedTo(typeof(Win32Exception))]
BepInEx/plugins/Broheim-SileroTTS/System.Runtime.Serialization.Formatters.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Runtime.Serialization.Formatters")] [assembly: AssemblyDescription("System.Runtime.Serialization.Formatters")] [assembly: AssemblyDefaultAlias("System.Runtime.Serialization.Formatters")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(NonSerializedAttribute))] [assembly: TypeForwardedTo(typeof(IDeserializationCallback))] [assembly: TypeForwardedTo(typeof(IFormatterConverter))] [assembly: TypeForwardedTo(typeof(ISerializable))] [assembly: TypeForwardedTo(typeof(SerializationEntry))] [assembly: TypeForwardedTo(typeof(SerializationInfo))] [assembly: TypeForwardedTo(typeof(SerializationInfoEnumerator))] [assembly: TypeForwardedTo(typeof(SerializableAttribute))]
BepInEx/plugins/Broheim-SileroTTS/System.ObjectModel.dll
Decompiled 2 days agousing System; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Windows.Input; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.ObjectModel")] [assembly: AssemblyDescription("System.ObjectModel")] [assembly: AssemblyDefaultAlias("System.ObjectModel")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(KeyedCollection<, >))] [assembly: TypeForwardedTo(typeof(ObservableCollection<>))] [assembly: TypeForwardedTo(typeof(ReadOnlyDictionary<, >))] [assembly: TypeForwardedTo(typeof(ReadOnlyObservableCollection<>))] [assembly: TypeForwardedTo(typeof(INotifyCollectionChanged))] [assembly: TypeForwardedTo(typeof(NotifyCollectionChangedAction))] [assembly: TypeForwardedTo(typeof(NotifyCollectionChangedEventArgs))] [assembly: TypeForwardedTo(typeof(NotifyCollectionChangedEventHandler))] [assembly: TypeForwardedTo(typeof(DataErrorsChangedEventArgs))] [assembly: TypeForwardedTo(typeof(INotifyDataErrorInfo))] [assembly: TypeForwardedTo(typeof(INotifyPropertyChanged))] [assembly: TypeForwardedTo(typeof(INotifyPropertyChanging))] [assembly: TypeForwardedTo(typeof(PropertyChangedEventArgs))] [assembly: TypeForwardedTo(typeof(PropertyChangedEventHandler))] [assembly: TypeForwardedTo(typeof(PropertyChangingEventArgs))] [assembly: TypeForwardedTo(typeof(PropertyChangingEventHandler))] [assembly: TypeForwardedTo(typeof(ICommand))]
BepInEx/plugins/Broheim-SileroTTS/System.ValueTuple.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.ValueTuple")] [assembly: AssemblyDescription("System.ValueTuple")] [assembly: AssemblyDefaultAlias("System.ValueTuple")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(TupleElementNamesAttribute))] [assembly: TypeForwardedTo(typeof(TupleExtensions))] [assembly: TypeForwardedTo(typeof(ValueTuple))] [assembly: TypeForwardedTo(typeof(ValueTuple<>))] [assembly: TypeForwardedTo(typeof(ValueTuple<, >))] [assembly: TypeForwardedTo(typeof(ValueTuple<, , >))] [assembly: TypeForwardedTo(typeof(ValueTuple<, , , >))] [assembly: TypeForwardedTo(typeof(ValueTuple<, , , , >))] [assembly: TypeForwardedTo(typeof(ValueTuple<, , , , , >))] [assembly: TypeForwardedTo(typeof(ValueTuple<, , , , , , >))] [assembly: TypeForwardedTo(typeof(ValueTuple<, , , , , , , >))]
BepInEx/plugins/Broheim-SileroTTS/System.Net.Primitives.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Net; using System.Net.NetworkInformation; using System.Net.Security; using System.Net.Sockets; using System.Reflection; using System.Runtime.CompilerServices; using System.Security.Authentication; using System.Security.Authentication.ExtendedProtection; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Net.Primitives")] [assembly: AssemblyDescription("System.Net.Primitives")] [assembly: AssemblyDefaultAlias("System.Net.Primitives")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(AuthenticationSchemes))] [assembly: TypeForwardedTo(typeof(Cookie))] [assembly: TypeForwardedTo(typeof(CookieCollection))] [assembly: TypeForwardedTo(typeof(CookieContainer))] [assembly: TypeForwardedTo(typeof(CookieException))] [assembly: TypeForwardedTo(typeof(CredentialCache))] [assembly: TypeForwardedTo(typeof(DecompressionMethods))] [assembly: TypeForwardedTo(typeof(DnsEndPoint))] [assembly: TypeForwardedTo(typeof(EndPoint))] [assembly: TypeForwardedTo(typeof(HttpStatusCode))] [assembly: TypeForwardedTo(typeof(ICredentials))] [assembly: TypeForwardedTo(typeof(ICredentialsByHost))] [assembly: TypeForwardedTo(typeof(IPAddress))] [assembly: TypeForwardedTo(typeof(IPEndPoint))] [assembly: TypeForwardedTo(typeof(IWebProxy))] [assembly: TypeForwardedTo(typeof(NetworkCredential))] [assembly: TypeForwardedTo(typeof(IPAddressCollection))] [assembly: TypeForwardedTo(typeof(AuthenticationLevel))] [assembly: TypeForwardedTo(typeof(SslPolicyErrors))] [assembly: TypeForwardedTo(typeof(SocketAddress))] [assembly: TypeForwardedTo(typeof(AddressFamily))] [assembly: TypeForwardedTo(typeof(SocketError))] [assembly: TypeForwardedTo(typeof(SocketException))] [assembly: TypeForwardedTo(typeof(TransportContext))] [assembly: TypeForwardedTo(typeof(CipherAlgorithmType))] [assembly: TypeForwardedTo(typeof(ExchangeAlgorithmType))] [assembly: TypeForwardedTo(typeof(ChannelBinding))] [assembly: TypeForwardedTo(typeof(ChannelBindingKind))] [assembly: TypeForwardedTo(typeof(HashAlgorithmType))] [assembly: TypeForwardedTo(typeof(SslProtocols))]
BepInEx/plugins/Broheim-SileroTTS/System.Windows.dll
Decompiled 2 days agousing System; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Windows.Input; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Windows")] [assembly: AssemblyDescription("System.Windows")] [assembly: AssemblyDefaultAlias("System.Windows")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.0.0")] [assembly: TypeForwardedTo(typeof(ObservableCollection<>))] [assembly: TypeForwardedTo(typeof(ReadOnlyObservableCollection<>))] [assembly: TypeForwardedTo(typeof(INotifyCollectionChanged))] [assembly: TypeForwardedTo(typeof(NotifyCollectionChangedAction))] [assembly: TypeForwardedTo(typeof(NotifyCollectionChangedEventArgs))] [assembly: TypeForwardedTo(typeof(NotifyCollectionChangedEventHandler))] [assembly: TypeForwardedTo(typeof(DataErrorsChangedEventArgs))] [assembly: TypeForwardedTo(typeof(INotifyDataErrorInfo))] [assembly: TypeForwardedTo(typeof(ICommand))]
BepInEx/plugins/Broheim-SileroTTS/System.Globalization.Extensions.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.CompilerServices; using System.Text; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Globalization.Extensions")] [assembly: AssemblyDescription("System.Globalization.Extensions")] [assembly: AssemblyDefaultAlias("System.Globalization.Extensions")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.3.0")] [assembly: TypeForwardedTo(typeof(GlobalizationExtensions))] [assembly: TypeForwardedTo(typeof(IdnMapping))] [assembly: TypeForwardedTo(typeof(StringNormalizationExtensions))] [assembly: TypeForwardedTo(typeof(NormalizationForm))]
BepInEx/plugins/Broheim-SileroTTS/System.Security.Cryptography.Primitives.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Security.Cryptography; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Security.Cryptography.Primitives")] [assembly: AssemblyDescription("System.Security.Cryptography.Primitives")] [assembly: AssemblyDefaultAlias("System.Security.Cryptography.Primitives")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(AsymmetricAlgorithm))] [assembly: TypeForwardedTo(typeof(CipherMode))] [assembly: TypeForwardedTo(typeof(CryptographicException))] [assembly: TypeForwardedTo(typeof(CryptoStream))] [assembly: TypeForwardedTo(typeof(CryptoStreamMode))] [assembly: TypeForwardedTo(typeof(HashAlgorithm))] [assembly: TypeForwardedTo(typeof(HashAlgorithmName))] [assembly: TypeForwardedTo(typeof(HMAC))] [assembly: TypeForwardedTo(typeof(ICryptoTransform))] [assembly: TypeForwardedTo(typeof(KeyedHashAlgorithm))] [assembly: TypeForwardedTo(typeof(KeySizes))] [assembly: TypeForwardedTo(typeof(PaddingMode))] [assembly: TypeForwardedTo(typeof(SymmetricAlgorithm))]
BepInEx/plugins/Broheim-SileroTTS/System.Collections.Concurrent.dll
Decompiled 2 days agousing System; using System.Collections.Concurrent; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Collections.Concurrent")] [assembly: AssemblyDescription("System.Collections.Concurrent")] [assembly: AssemblyDefaultAlias("System.Collections.Concurrent")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(BlockingCollection<>))] [assembly: TypeForwardedTo(typeof(ConcurrentBag<>))] [assembly: TypeForwardedTo(typeof(ConcurrentDictionary<, >))] [assembly: TypeForwardedTo(typeof(ConcurrentQueue<>))] [assembly: TypeForwardedTo(typeof(ConcurrentStack<>))] [assembly: TypeForwardedTo(typeof(EnumerablePartitionerOptions))] [assembly: TypeForwardedTo(typeof(IProducerConsumerCollection<>))] [assembly: TypeForwardedTo(typeof(OrderablePartitioner<>))] [assembly: TypeForwardedTo(typeof(Partitioner))] [assembly: TypeForwardedTo(typeof(Partitioner<>))]
BepInEx/plugins/Broheim-SileroTTS/System.Diagnostics.Contracts.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Diagnostics.Contracts; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Diagnostics.Contracts")] [assembly: AssemblyDescription("System.Diagnostics.Contracts")] [assembly: AssemblyDefaultAlias("System.Diagnostics.Contracts")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(Contract))] [assembly: TypeForwardedTo(typeof(ContractAbbreviatorAttribute))] [assembly: TypeForwardedTo(typeof(ContractArgumentValidatorAttribute))] [assembly: TypeForwardedTo(typeof(ContractClassAttribute))] [assembly: TypeForwardedTo(typeof(ContractClassForAttribute))] [assembly: TypeForwardedTo(typeof(ContractFailedEventArgs))] [assembly: TypeForwardedTo(typeof(ContractFailureKind))] [assembly: TypeForwardedTo(typeof(ContractInvariantMethodAttribute))] [assembly: TypeForwardedTo(typeof(ContractOptionAttribute))] [assembly: TypeForwardedTo(typeof(ContractPublicPropertyNameAttribute))] [assembly: TypeForwardedTo(typeof(ContractReferenceAssemblyAttribute))] [assembly: TypeForwardedTo(typeof(ContractRuntimeIgnoredAttribute))] [assembly: TypeForwardedTo(typeof(ContractVerificationAttribute))] [assembly: TypeForwardedTo(typeof(PureAttribute))] [assembly: TypeForwardedTo(typeof(ContractHelper))]
BepInEx/plugins/Broheim-SileroTTS/System.Runtime.CompilerServices.VisualC.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Runtime.CompilerServices.VisualC")] [assembly: AssemblyDescription("System.Runtime.CompilerServices.VisualC")] [assembly: AssemblyDefaultAlias("System.Runtime.CompilerServices.VisualC")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(CallConvCdecl))] [assembly: TypeForwardedTo(typeof(CallConvFastcall))] [assembly: TypeForwardedTo(typeof(CallConvStdcall))] [assembly: TypeForwardedTo(typeof(CallConvThiscall))] [assembly: TypeForwardedTo(typeof(IsBoxed))] [assembly: TypeForwardedTo(typeof(IsByValue))] [assembly: TypeForwardedTo(typeof(IsCopyConstructed))] [assembly: TypeForwardedTo(typeof(IsExplicitlyDereferenced))] [assembly: TypeForwardedTo(typeof(IsImplicitlyDereferenced))] [assembly: TypeForwardedTo(typeof(IsJitIntrinsic))] [assembly: TypeForwardedTo(typeof(IsLong))] [assembly: TypeForwardedTo(typeof(IsSignUnspecifiedByte))] [assembly: TypeForwardedTo(typeof(IsUdtReturn))] [assembly: TypeForwardedTo(typeof(NativeCppClassAttribute))] [assembly: TypeForwardedTo(typeof(RequiredAttributeAttribute))]
BepInEx/plugins/Broheim-SileroTTS/System.Resources.Writer.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Resources.Writer")] [assembly: AssemblyDescription("System.Resources.Writer")] [assembly: AssemblyDefaultAlias("System.Resources.Writer")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(ResourceWriter))]
BepInEx/plugins/Broheim-SileroTTS/System.Data.Common.dll
Decompiled 2 days agousing System; using System.Data; using System.Data.Common; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Data.Common")] [assembly: AssemblyDescription("System.Data.Common")] [assembly: AssemblyDefaultAlias("System.Data.Common")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(CommandBehavior))] [assembly: TypeForwardedTo(typeof(CommandType))] [assembly: TypeForwardedTo(typeof(DbColumn))] [assembly: TypeForwardedTo(typeof(DbCommand))] [assembly: TypeForwardedTo(typeof(DbConnection))] [assembly: TypeForwardedTo(typeof(DbConnectionStringBuilder))] [assembly: TypeForwardedTo(typeof(DbDataReader))] [assembly: TypeForwardedTo(typeof(DbDataReaderExtensions))] [assembly: TypeForwardedTo(typeof(DbDataRecord))] [assembly: TypeForwardedTo(typeof(DbEnumerator))] [assembly: TypeForwardedTo(typeof(DbException))] [assembly: TypeForwardedTo(typeof(DbParameter))] [assembly: TypeForwardedTo(typeof(DbParameterCollection))] [assembly: TypeForwardedTo(typeof(DbProviderFactory))] [assembly: TypeForwardedTo(typeof(DbTransaction))] [assembly: TypeForwardedTo(typeof(IDbColumnSchemaGenerator))] [assembly: TypeForwardedTo(typeof(ConnectionState))] [assembly: TypeForwardedTo(typeof(DataRowVersion))] [assembly: TypeForwardedTo(typeof(DataTable))] [assembly: TypeForwardedTo(typeof(DbType))] [assembly: TypeForwardedTo(typeof(IDataParameter))] [assembly: TypeForwardedTo(typeof(IDataParameterCollection))] [assembly: TypeForwardedTo(typeof(IDataReader))] [assembly: TypeForwardedTo(typeof(IDataRecord))] [assembly: TypeForwardedTo(typeof(IDbCommand))] [assembly: TypeForwardedTo(typeof(IDbConnection))] [assembly: TypeForwardedTo(typeof(IDbDataParameter))] [assembly: TypeForwardedTo(typeof(IDbTransaction))] [assembly: TypeForwardedTo(typeof(IsolationLevel))] [assembly: TypeForwardedTo(typeof(ParameterDirection))] [assembly: TypeForwardedTo(typeof(StateChangeEventArgs))] [assembly: TypeForwardedTo(typeof(StateChangeEventHandler))] [assembly: TypeForwardedTo(typeof(UpdateRowSource))] [assembly: TypeForwardedTo(typeof(DBNull))]
BepInEx/plugins/Broheim-SileroTTS/System.ComponentModel.dll
Decompiled 2 days agousing System; using System.ComponentModel; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.ComponentModel")] [assembly: AssemblyDescription("System.ComponentModel")] [assembly: AssemblyDefaultAlias("System.ComponentModel")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(CancelEventArgs))] [assembly: TypeForwardedTo(typeof(IChangeTracking))] [assembly: TypeForwardedTo(typeof(IEditableObject))] [assembly: TypeForwardedTo(typeof(IRevertibleChangeTracking))] [assembly: TypeForwardedTo(typeof(IServiceProvider))]
BepInEx/plugins/Broheim-SileroTTS/TorchSharp.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
#define TRACE using System; using System.Buffers; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.Linq; using System.Net; using System.Net.Http; using System.Numerics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Cryptography; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using Google.Protobuf.WellKnownTypes; using ICSharpCode.SharpZipLib.Core; using ICSharpCode.SharpZipLib.GZip; using ICSharpCode.SharpZipLib.Tar; using Microsoft.CodeAnalysis; using SkiaSharp; using Tensorboard; using TorchSharp.Modules; using TorchSharp.PInvoke; using TorchSharp.Utils; using TorchSharp.Utils.tensorboard.Enums; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")] [assembly: AssemblyCompany("TorchSharp")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("0.106.0.0")] [assembly: AssemblyInformationalVersion("0.106.0")] [assembly: AssemblyProduct("TorchSharp")] [assembly: AssemblyTitle("TorchSharp")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/dotnet/")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.106.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] internal sealed class IsUnmanagedAttribute : Attribute { } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace Tensorboard { public static class AllocationDescriptionReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor => descriptor; static AllocationDescriptionReflection() { //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Expected O, but got Unknown descriptor = FileDescriptor.FromGeneratedCode(Convert.FromBase64String("CjV0ZW5zb3Jib2FyZC9jb21wYXQvcHJvdG8vYWxsb2NhdGlvbl9kZXNjcmlw" + "dGlvbi5wcm90bxILdGVuc29yYm9hcmQiowEKFUFsbG9jYXRpb25EZXNjcmlw" + "dGlvbhIXCg9yZXF1ZXN0ZWRfYnl0ZXMYASABKAMSFwoPYWxsb2NhdGVkX2J5" + "dGVzGAIgASgDEhYKDmFsbG9jYXRvcl9uYW1lGAMgASgJEhUKDWFsbG9jYXRp" + "b25faWQYBCABKAMSHAoUaGFzX3NpbmdsZV9yZWZlcmVuY2UYBSABKAgSCwoD" + "cHRyGAYgASgEQpsBChhvcmcudGVuc29yZmxvdy5mcmFtZXdvcmtCG0FsbG9j" + "YXRpb25EZXNjcmlwdGlvblByb3Rvc1ABWl1naXRodWIuY29tL3RlbnNvcmZs" + "b3cvdGVuc29yZmxvdy90ZW5zb3JmbG93L2dvL2NvcmUvZnJhbWV3b3JrL2Fs" + "bG9jYXRpb25fZGVzY3JpcHRpb25fZ29fcHJvdG/4AQFiBnByb3RvMw=="), (FileDescriptor[])(object)new FileDescriptor[0], new GeneratedClrTypeInfo((Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])(object)new GeneratedClrTypeInfo[1] { new GeneratedClrTypeInfo(typeof(AllocationDescription), (MessageParser)(object)AllocationDescription.Parser, new string[6] { "RequestedBytes", "AllocatedBytes", "AllocatorName", "AllocationId", "HasSingleReference", "Ptr" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])null) })); } } public sealed class AllocationDescription : IMessage<AllocationDescription>, IMessage, IEquatable<AllocationDescription>, IDeepCloneable<AllocationDescription> { private static readonly MessageParser<AllocationDescription> _parser = new MessageParser<AllocationDescription>((Func<AllocationDescription>)(() => new AllocationDescription())); private UnknownFieldSet _unknownFields; public const int RequestedBytesFieldNumber = 1; private long requestedBytes_; public const int AllocatedBytesFieldNumber = 2; private long allocatedBytes_; public const int AllocatorNameFieldNumber = 3; private string allocatorName_ = ""; public const int AllocationIdFieldNumber = 4; private long allocationId_; public const int HasSingleReferenceFieldNumber = 5; private bool hasSingleReference_; public const int PtrFieldNumber = 6; private ulong ptr_; [DebuggerNonUserCode] public static MessageParser<AllocationDescription> Parser => _parser; [DebuggerNonUserCode] public static MessageDescriptor Descriptor => AllocationDescriptionReflection.Descriptor.MessageTypes[0]; [DebuggerNonUserCode] MessageDescriptor IMessage.Descriptor => Descriptor; [DebuggerNonUserCode] public long RequestedBytes { get { return requestedBytes_; } set { requestedBytes_ = value; } } [DebuggerNonUserCode] public long AllocatedBytes { get { return allocatedBytes_; } set { allocatedBytes_ = value; } } [DebuggerNonUserCode] public string AllocatorName { get { return allocatorName_; } set { allocatorName_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public long AllocationId { get { return allocationId_; } set { allocationId_ = value; } } [DebuggerNonUserCode] public bool HasSingleReference { get { return hasSingleReference_; } set { hasSingleReference_ = value; } } [DebuggerNonUserCode] public ulong Ptr { get { return ptr_; } set { ptr_ = value; } } [DebuggerNonUserCode] public AllocationDescription() { } [DebuggerNonUserCode] public AllocationDescription(AllocationDescription other) : this() { requestedBytes_ = other.requestedBytes_; allocatedBytes_ = other.allocatedBytes_; allocatorName_ = other.allocatorName_; allocationId_ = other.allocationId_; hasSingleReference_ = other.hasSingleReference_; ptr_ = other.ptr_; _unknownFields = UnknownFieldSet.Clone(other._unknownFields); } [DebuggerNonUserCode] public AllocationDescription Clone() { return new AllocationDescription(this); } [DebuggerNonUserCode] public override bool Equals(object other) { return Equals(other as AllocationDescription); } [DebuggerNonUserCode] public bool Equals(AllocationDescription other) { if (other == null) { return false; } if (other == this) { return true; } if (RequestedBytes != other.RequestedBytes) { return false; } if (AllocatedBytes != other.AllocatedBytes) { return false; } if (AllocatorName != other.AllocatorName) { return false; } if (AllocationId != other.AllocationId) { return false; } if (HasSingleReference != other.HasSingleReference) { return false; } if (Ptr != other.Ptr) { return false; } return object.Equals(_unknownFields, other._unknownFields); } [DebuggerNonUserCode] public override int GetHashCode() { int num = 1; if (RequestedBytes != 0L) { num ^= RequestedBytes.GetHashCode(); } if (AllocatedBytes != 0L) { num ^= AllocatedBytes.GetHashCode(); } if (AllocatorName.Length != 0) { num ^= AllocatorName.GetHashCode(); } if (AllocationId != 0L) { num ^= AllocationId.GetHashCode(); } if (HasSingleReference) { num ^= HasSingleReference.GetHashCode(); } if (Ptr != 0L) { num ^= Ptr.GetHashCode(); } if (_unknownFields != null) { num ^= ((object)_unknownFields).GetHashCode(); } return num; } [DebuggerNonUserCode] public override string ToString() { return JsonFormatter.ToDiagnosticString((IMessage)(object)this); } [DebuggerNonUserCode] public void WriteTo(CodedOutputStream output) { if (RequestedBytes != 0L) { output.WriteRawTag((byte)8); output.WriteInt64(RequestedBytes); } if (AllocatedBytes != 0L) { output.WriteRawTag((byte)16); output.WriteInt64(AllocatedBytes); } if (AllocatorName.Length != 0) { output.WriteRawTag((byte)26); output.WriteString(AllocatorName); } if (AllocationId != 0L) { output.WriteRawTag((byte)32); output.WriteInt64(AllocationId); } if (HasSingleReference) { output.WriteRawTag((byte)40); output.WriteBool(HasSingleReference); } if (Ptr != 0L) { output.WriteRawTag((byte)48); output.WriteUInt64(Ptr); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [DebuggerNonUserCode] public int CalculateSize() { int num = 0; if (RequestedBytes != 0L) { num += 1 + CodedOutputStream.ComputeInt64Size(RequestedBytes); } if (AllocatedBytes != 0L) { num += 1 + CodedOutputStream.ComputeInt64Size(AllocatedBytes); } if (AllocatorName.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(AllocatorName); } if (AllocationId != 0L) { num += 1 + CodedOutputStream.ComputeInt64Size(AllocationId); } if (HasSingleReference) { num += 2; } if (Ptr != 0L) { num += 1 + CodedOutputStream.ComputeUInt64Size(Ptr); } if (_unknownFields != null) { num += _unknownFields.CalculateSize(); } return num; } [DebuggerNonUserCode] public void MergeFrom(AllocationDescription other) { if (other != null) { if (other.RequestedBytes != 0L) { RequestedBytes = other.RequestedBytes; } if (other.AllocatedBytes != 0L) { AllocatedBytes = other.AllocatedBytes; } if (other.AllocatorName.Length != 0) { AllocatorName = other.AllocatorName; } if (other.AllocationId != 0L) { AllocationId = other.AllocationId; } if (other.HasSingleReference) { HasSingleReference = other.HasSingleReference; } if (other.Ptr != 0L) { Ptr = other.Ptr; } _unknownFields = UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } } [DebuggerNonUserCode] public void MergeFrom(CodedInputStream input) { uint num; while ((num = input.ReadTag()) != 0) { switch (num) { default: _unknownFields = UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8u: RequestedBytes = input.ReadInt64(); break; case 16u: AllocatedBytes = input.ReadInt64(); break; case 26u: AllocatorName = input.ReadString(); break; case 32u: AllocationId = input.ReadInt64(); break; case 40u: HasSingleReference = input.ReadBool(); break; case 48u: Ptr = input.ReadUInt64(); break; } } } } public static class ApiDefReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor => descriptor; static ApiDefReflection() { //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Expected O, but got Unknown //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Expected O, but got Unknown //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Expected O, but got Unknown //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Expected O, but got Unknown //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Expected O, but got Unknown //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Expected O, but got Unknown descriptor = FileDescriptor.FromGeneratedCode(Convert.FromBase64String("CiZ0ZW5zb3Jib2FyZC9jb21wYXQvcHJvdG8vYXBpX2RlZi5wcm90bxILdGVu" + "c29yYm9hcmQaKXRlbnNvcmJvYXJkL2NvbXBhdC9wcm90by9hdHRyX3ZhbHVl" + "LnByb3RvIucFCgZBcGlEZWYSFQoNZ3JhcGhfb3BfbmFtZRgBIAEoCRIbChNk" + "ZXByZWNhdGlvbl9tZXNzYWdlGAwgASgJEhsKE2RlcHJlY2F0aW9uX3ZlcnNp" + "b24YDSABKAUSMgoKdmlzaWJpbGl0eRgCIAEoDjIeLnRlbnNvcmJvYXJkLkFw" + "aURlZi5WaXNpYmlsaXR5Ei4KCGVuZHBvaW50GAMgAygLMhwudGVuc29yYm9h" + "cmQuQXBpRGVmLkVuZHBvaW50EicKBmluX2FyZxgEIAMoCzIXLnRlbnNvcmJv" + "YXJkLkFwaURlZi5BcmcSKAoHb3V0X2FyZxgFIAMoCzIXLnRlbnNvcmJvYXJk" + "LkFwaURlZi5BcmcSEQoJYXJnX29yZGVyGAsgAygJEiYKBGF0dHIYBiADKAsy" + "GC50ZW5zb3Jib2FyZC5BcGlEZWYuQXR0chIPCgdzdW1tYXJ5GAcgASgJEhMK" + "C2Rlc2NyaXB0aW9uGAggASgJEhoKEmRlc2NyaXB0aW9uX3ByZWZpeBgJIAEo" + "CRIaChJkZXNjcmlwdGlvbl9zdWZmaXgYCiABKAkaSQoIRW5kcG9pbnQSDAoE" + "bmFtZRgBIAEoCRISCgpkZXByZWNhdGVkGAMgASgIEhsKE2RlcHJlY2F0aW9u" + "X3ZlcnNpb24YBCABKAUaOwoDQXJnEgwKBG5hbWUYASABKAkSEQoJcmVuYW1l" + "X3RvGAIgASgJEhMKC2Rlc2NyaXB0aW9uGAMgASgJGmsKBEF0dHISDAoEbmFt" + "ZRgBIAEoCRIRCglyZW5hbWVfdG8YAiABKAkSLQoNZGVmYXVsdF92YWx1ZRgD" + "IAEoCzIWLnRlbnNvcmJvYXJkLkF0dHJWYWx1ZRITCgtkZXNjcmlwdGlvbhgE" + "IAEoCSJHCgpWaXNpYmlsaXR5EhYKEkRFRkFVTFRfVklTSUJJTElUWRAAEgsK" + "B1ZJU0lCTEUQARIICgRTS0lQEAISCgoGSElEREVOEAMiKgoHQXBpRGVmcxIf" + "CgJvcBgBIAMoCzITLnRlbnNvcmJvYXJkLkFwaURlZkJ9ChhvcmcudGVuc29y" + "Zmxvdy5mcmFtZXdvcmtCDEFwaURlZlByb3Rvc1ABWk5naXRodWIuY29tL3Rl" + "bnNvcmZsb3cvdGVuc29yZmxvdy90ZW5zb3JmbG93L2dvL2NvcmUvZnJhbWV3" + "b3JrL2FwaV9kZWZfZ29fcHJvdG/4AQFiBnByb3RvMw=="), (FileDescriptor[])(object)new FileDescriptor[1] { AttrValueReflection.Descriptor }, new GeneratedClrTypeInfo((Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])(object)new GeneratedClrTypeInfo[2] { new GeneratedClrTypeInfo(typeof(ApiDef), (MessageParser)(object)ApiDef.Parser, new string[13] { "GraphOpName", "DeprecationMessage", "DeprecationVersion", "Visibility", "Endpoint", "InArg", "OutArg", "ArgOrder", "Attr", "Summary", "Description", "DescriptionPrefix", "DescriptionSuffix" }, (string[])null, new Type[1] { typeof(ApiDef.Types.Visibility) }, (Extension[])null, (GeneratedClrTypeInfo[])(object)new GeneratedClrTypeInfo[3] { new GeneratedClrTypeInfo(typeof(ApiDef.Types.Endpoint), (MessageParser)(object)ApiDef.Types.Endpoint.Parser, new string[3] { "Name", "Deprecated", "DeprecationVersion" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])null), new GeneratedClrTypeInfo(typeof(ApiDef.Types.Arg), (MessageParser)(object)ApiDef.Types.Arg.Parser, new string[3] { "Name", "RenameTo", "Description" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])null), new GeneratedClrTypeInfo(typeof(ApiDef.Types.Attr), (MessageParser)(object)ApiDef.Types.Attr.Parser, new string[4] { "Name", "RenameTo", "DefaultValue", "Description" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])null) }), new GeneratedClrTypeInfo(typeof(ApiDefs), (MessageParser)(object)ApiDefs.Parser, new string[1] { "Op" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])null) })); } } public sealed class ApiDef : IMessage<ApiDef>, IMessage, IEquatable<ApiDef>, IDeepCloneable<ApiDef> { [DebuggerNonUserCode] public static class Types { public enum Visibility { [OriginalName("DEFAULT_VISIBILITY")] DefaultVisibility, [OriginalName("VISIBLE")] Visible, [OriginalName("SKIP")] Skip, [OriginalName("HIDDEN")] Hidden } public sealed class Endpoint : IMessage<Endpoint>, IMessage, IEquatable<Endpoint>, IDeepCloneable<Endpoint> { private static readonly MessageParser<Endpoint> _parser = new MessageParser<Endpoint>((Func<Endpoint>)(() => new Endpoint())); private UnknownFieldSet _unknownFields; public const int NameFieldNumber = 1; private string name_ = ""; public const int DeprecatedFieldNumber = 3; private bool deprecated_; public const int DeprecationVersionFieldNumber = 4; private int deprecationVersion_; [DebuggerNonUserCode] public static MessageParser<Endpoint> Parser => _parser; [DebuggerNonUserCode] public static MessageDescriptor Descriptor => ApiDef.Descriptor.NestedTypes[0]; [DebuggerNonUserCode] MessageDescriptor IMessage.Descriptor => Descriptor; [DebuggerNonUserCode] public string Name { get { return name_; } set { name_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public bool Deprecated { get { return deprecated_; } set { deprecated_ = value; } } [DebuggerNonUserCode] public int DeprecationVersion { get { return deprecationVersion_; } set { deprecationVersion_ = value; } } [DebuggerNonUserCode] public Endpoint() { } [DebuggerNonUserCode] public Endpoint(Endpoint other) : this() { name_ = other.name_; deprecated_ = other.deprecated_; deprecationVersion_ = other.deprecationVersion_; _unknownFields = UnknownFieldSet.Clone(other._unknownFields); } [DebuggerNonUserCode] public Endpoint Clone() { return new Endpoint(this); } [DebuggerNonUserCode] public override bool Equals(object other) { return Equals(other as Endpoint); } [DebuggerNonUserCode] public bool Equals(Endpoint other) { if (other == null) { return false; } if (other == this) { return true; } if (Name != other.Name) { return false; } if (Deprecated != other.Deprecated) { return false; } if (DeprecationVersion != other.DeprecationVersion) { return false; } return object.Equals(_unknownFields, other._unknownFields); } [DebuggerNonUserCode] public override int GetHashCode() { int num = 1; if (Name.Length != 0) { num ^= Name.GetHashCode(); } if (Deprecated) { num ^= Deprecated.GetHashCode(); } if (DeprecationVersion != 0) { num ^= DeprecationVersion.GetHashCode(); } if (_unknownFields != null) { num ^= ((object)_unknownFields).GetHashCode(); } return num; } [DebuggerNonUserCode] public override string ToString() { return JsonFormatter.ToDiagnosticString((IMessage)(object)this); } [DebuggerNonUserCode] public void WriteTo(CodedOutputStream output) { if (Name.Length != 0) { output.WriteRawTag((byte)10); output.WriteString(Name); } if (Deprecated) { output.WriteRawTag((byte)24); output.WriteBool(Deprecated); } if (DeprecationVersion != 0) { output.WriteRawTag((byte)32); output.WriteInt32(DeprecationVersion); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [DebuggerNonUserCode] public int CalculateSize() { int num = 0; if (Name.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(Name); } if (Deprecated) { num += 2; } if (DeprecationVersion != 0) { num += 1 + CodedOutputStream.ComputeInt32Size(DeprecationVersion); } if (_unknownFields != null) { num += _unknownFields.CalculateSize(); } return num; } [DebuggerNonUserCode] public void MergeFrom(Endpoint other) { if (other != null) { if (other.Name.Length != 0) { Name = other.Name; } if (other.Deprecated) { Deprecated = other.Deprecated; } if (other.DeprecationVersion != 0) { DeprecationVersion = other.DeprecationVersion; } _unknownFields = UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } } [DebuggerNonUserCode] public void MergeFrom(CodedInputStream input) { uint num; while ((num = input.ReadTag()) != 0) { switch (num) { default: _unknownFields = UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10u: Name = input.ReadString(); break; case 24u: Deprecated = input.ReadBool(); break; case 32u: DeprecationVersion = input.ReadInt32(); break; } } } } public sealed class Arg : IMessage<Arg>, IMessage, IEquatable<Arg>, IDeepCloneable<Arg> { private static readonly MessageParser<Arg> _parser = new MessageParser<Arg>((Func<Arg>)(() => new Arg())); private UnknownFieldSet _unknownFields; public const int NameFieldNumber = 1; private string name_ = ""; public const int RenameToFieldNumber = 2; private string renameTo_ = ""; public const int DescriptionFieldNumber = 3; private string description_ = ""; [DebuggerNonUserCode] public static MessageParser<Arg> Parser => _parser; [DebuggerNonUserCode] public static MessageDescriptor Descriptor => ApiDef.Descriptor.NestedTypes[1]; [DebuggerNonUserCode] MessageDescriptor IMessage.Descriptor => Descriptor; [DebuggerNonUserCode] public string Name { get { return name_; } set { name_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public string RenameTo { get { return renameTo_; } set { renameTo_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public string Description { get { return description_; } set { description_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public Arg() { } [DebuggerNonUserCode] public Arg(Arg other) : this() { name_ = other.name_; renameTo_ = other.renameTo_; description_ = other.description_; _unknownFields = UnknownFieldSet.Clone(other._unknownFields); } [DebuggerNonUserCode] public Arg Clone() { return new Arg(this); } [DebuggerNonUserCode] public override bool Equals(object other) { return Equals(other as Arg); } [DebuggerNonUserCode] public bool Equals(Arg other) { if (other == null) { return false; } if (other == this) { return true; } if (Name != other.Name) { return false; } if (RenameTo != other.RenameTo) { return false; } if (Description != other.Description) { return false; } return object.Equals(_unknownFields, other._unknownFields); } [DebuggerNonUserCode] public override int GetHashCode() { int num = 1; if (Name.Length != 0) { num ^= Name.GetHashCode(); } if (RenameTo.Length != 0) { num ^= RenameTo.GetHashCode(); } if (Description.Length != 0) { num ^= Description.GetHashCode(); } if (_unknownFields != null) { num ^= ((object)_unknownFields).GetHashCode(); } return num; } [DebuggerNonUserCode] public override string ToString() { return JsonFormatter.ToDiagnosticString((IMessage)(object)this); } [DebuggerNonUserCode] public void WriteTo(CodedOutputStream output) { if (Name.Length != 0) { output.WriteRawTag((byte)10); output.WriteString(Name); } if (RenameTo.Length != 0) { output.WriteRawTag((byte)18); output.WriteString(RenameTo); } if (Description.Length != 0) { output.WriteRawTag((byte)26); output.WriteString(Description); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [DebuggerNonUserCode] public int CalculateSize() { int num = 0; if (Name.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(Name); } if (RenameTo.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(RenameTo); } if (Description.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(Description); } if (_unknownFields != null) { num += _unknownFields.CalculateSize(); } return num; } [DebuggerNonUserCode] public void MergeFrom(Arg other) { if (other != null) { if (other.Name.Length != 0) { Name = other.Name; } if (other.RenameTo.Length != 0) { RenameTo = other.RenameTo; } if (other.Description.Length != 0) { Description = other.Description; } _unknownFields = UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } } [DebuggerNonUserCode] public void MergeFrom(CodedInputStream input) { uint num; while ((num = input.ReadTag()) != 0) { switch (num) { default: _unknownFields = UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10u: Name = input.ReadString(); break; case 18u: RenameTo = input.ReadString(); break; case 26u: Description = input.ReadString(); break; } } } } public sealed class Attr : IMessage<Attr>, IMessage, IEquatable<Attr>, IDeepCloneable<Attr> { private static readonly MessageParser<Attr> _parser = new MessageParser<Attr>((Func<Attr>)(() => new Attr())); private UnknownFieldSet _unknownFields; public const int NameFieldNumber = 1; private string name_ = ""; public const int RenameToFieldNumber = 2; private string renameTo_ = ""; public const int DefaultValueFieldNumber = 3; private AttrValue defaultValue_; public const int DescriptionFieldNumber = 4; private string description_ = ""; [DebuggerNonUserCode] public static MessageParser<Attr> Parser => _parser; [DebuggerNonUserCode] public static MessageDescriptor Descriptor => ApiDef.Descriptor.NestedTypes[2]; [DebuggerNonUserCode] MessageDescriptor IMessage.Descriptor => Descriptor; [DebuggerNonUserCode] public string Name { get { return name_; } set { name_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public string RenameTo { get { return renameTo_; } set { renameTo_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public AttrValue DefaultValue { get { return defaultValue_; } set { defaultValue_ = value; } } [DebuggerNonUserCode] public string Description { get { return description_; } set { description_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public Attr() { } [DebuggerNonUserCode] public Attr(Attr other) : this() { name_ = other.name_; renameTo_ = other.renameTo_; defaultValue_ = ((other.defaultValue_ != null) ? other.defaultValue_.Clone() : null); description_ = other.description_; _unknownFields = UnknownFieldSet.Clone(other._unknownFields); } [DebuggerNonUserCode] public Attr Clone() { return new Attr(this); } [DebuggerNonUserCode] public override bool Equals(object other) { return Equals(other as Attr); } [DebuggerNonUserCode] public bool Equals(Attr other) { if (other == null) { return false; } if (other == this) { return true; } if (Name != other.Name) { return false; } if (RenameTo != other.RenameTo) { return false; } if (!object.Equals(DefaultValue, other.DefaultValue)) { return false; } if (Description != other.Description) { return false; } return object.Equals(_unknownFields, other._unknownFields); } [DebuggerNonUserCode] public override int GetHashCode() { int num = 1; if (Name.Length != 0) { num ^= Name.GetHashCode(); } if (RenameTo.Length != 0) { num ^= RenameTo.GetHashCode(); } if (defaultValue_ != null) { num ^= DefaultValue.GetHashCode(); } if (Description.Length != 0) { num ^= Description.GetHashCode(); } if (_unknownFields != null) { num ^= ((object)_unknownFields).GetHashCode(); } return num; } [DebuggerNonUserCode] public override string ToString() { return JsonFormatter.ToDiagnosticString((IMessage)(object)this); } [DebuggerNonUserCode] public void WriteTo(CodedOutputStream output) { if (Name.Length != 0) { output.WriteRawTag((byte)10); output.WriteString(Name); } if (RenameTo.Length != 0) { output.WriteRawTag((byte)18); output.WriteString(RenameTo); } if (defaultValue_ != null) { output.WriteRawTag((byte)26); output.WriteMessage((IMessage)(object)DefaultValue); } if (Description.Length != 0) { output.WriteRawTag((byte)34); output.WriteString(Description); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [DebuggerNonUserCode] public int CalculateSize() { int num = 0; if (Name.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(Name); } if (RenameTo.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(RenameTo); } if (defaultValue_ != null) { num += 1 + CodedOutputStream.ComputeMessageSize((IMessage)(object)DefaultValue); } if (Description.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(Description); } if (_unknownFields != null) { num += _unknownFields.CalculateSize(); } return num; } [DebuggerNonUserCode] public void MergeFrom(Attr other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } if (other.RenameTo.Length != 0) { RenameTo = other.RenameTo; } if (other.defaultValue_ != null) { if (defaultValue_ == null) { DefaultValue = new AttrValue(); } DefaultValue.MergeFrom(other.DefaultValue); } if (other.Description.Length != 0) { Description = other.Description; } _unknownFields = UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [DebuggerNonUserCode] public void MergeFrom(CodedInputStream input) { uint num; while ((num = input.ReadTag()) != 0) { switch (num) { default: _unknownFields = UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10u: Name = input.ReadString(); break; case 18u: RenameTo = input.ReadString(); break; case 26u: if (defaultValue_ == null) { DefaultValue = new AttrValue(); } input.ReadMessage((IMessage)(object)DefaultValue); break; case 34u: Description = input.ReadString(); break; } } } } } private static readonly MessageParser<ApiDef> _parser = new MessageParser<ApiDef>((Func<ApiDef>)(() => new ApiDef())); private UnknownFieldSet _unknownFields; public const int GraphOpNameFieldNumber = 1; private string graphOpName_ = ""; public const int DeprecationMessageFieldNumber = 12; private string deprecationMessage_ = ""; public const int DeprecationVersionFieldNumber = 13; private int deprecationVersion_; public const int VisibilityFieldNumber = 2; private Types.Visibility visibility_; public const int EndpointFieldNumber = 3; private static readonly FieldCodec<Types.Endpoint> _repeated_endpoint_codec = FieldCodec.ForMessage<Types.Endpoint>(26u, Types.Endpoint.Parser); private readonly RepeatedField<Types.Endpoint> endpoint_ = new RepeatedField<Types.Endpoint>(); public const int InArgFieldNumber = 4; private static readonly FieldCodec<Types.Arg> _repeated_inArg_codec = FieldCodec.ForMessage<Types.Arg>(34u, Types.Arg.Parser); private readonly RepeatedField<Types.Arg> inArg_ = new RepeatedField<Types.Arg>(); public const int OutArgFieldNumber = 5; private static readonly FieldCodec<Types.Arg> _repeated_outArg_codec = FieldCodec.ForMessage<Types.Arg>(42u, Types.Arg.Parser); private readonly RepeatedField<Types.Arg> outArg_ = new RepeatedField<Types.Arg>(); public const int ArgOrderFieldNumber = 11; private static readonly FieldCodec<string> _repeated_argOrder_codec = FieldCodec.ForString(90u); private readonly RepeatedField<string> argOrder_ = new RepeatedField<string>(); public const int AttrFieldNumber = 6; private static readonly FieldCodec<Types.Attr> _repeated_attr_codec = FieldCodec.ForMessage<Types.Attr>(50u, Types.Attr.Parser); private readonly RepeatedField<Types.Attr> attr_ = new RepeatedField<Types.Attr>(); public const int SummaryFieldNumber = 7; private string summary_ = ""; public const int DescriptionFieldNumber = 8; private string description_ = ""; public const int DescriptionPrefixFieldNumber = 9; private string descriptionPrefix_ = ""; public const int DescriptionSuffixFieldNumber = 10; private string descriptionSuffix_ = ""; [DebuggerNonUserCode] public static MessageParser<ApiDef> Parser => _parser; [DebuggerNonUserCode] public static MessageDescriptor Descriptor => ApiDefReflection.Descriptor.MessageTypes[0]; [DebuggerNonUserCode] MessageDescriptor IMessage.Descriptor => Descriptor; [DebuggerNonUserCode] public string GraphOpName { get { return graphOpName_; } set { graphOpName_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public string DeprecationMessage { get { return deprecationMessage_; } set { deprecationMessage_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public int DeprecationVersion { get { return deprecationVersion_; } set { deprecationVersion_ = value; } } [DebuggerNonUserCode] public Types.Visibility Visibility { get { return visibility_; } set { visibility_ = value; } } [DebuggerNonUserCode] public RepeatedField<Types.Endpoint> Endpoint => endpoint_; [DebuggerNonUserCode] public RepeatedField<Types.Arg> InArg => inArg_; [DebuggerNonUserCode] public RepeatedField<Types.Arg> OutArg => outArg_; [DebuggerNonUserCode] public RepeatedField<string> ArgOrder => argOrder_; [DebuggerNonUserCode] public RepeatedField<Types.Attr> Attr => attr_; [DebuggerNonUserCode] public string Summary { get { return summary_; } set { summary_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public string Description { get { return description_; } set { description_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public string DescriptionPrefix { get { return descriptionPrefix_; } set { descriptionPrefix_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public string DescriptionSuffix { get { return descriptionSuffix_; } set { descriptionSuffix_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public ApiDef() { } [DebuggerNonUserCode] public ApiDef(ApiDef other) : this() { graphOpName_ = other.graphOpName_; deprecationMessage_ = other.deprecationMessage_; deprecationVersion_ = other.deprecationVersion_; visibility_ = other.visibility_; endpoint_ = other.endpoint_.Clone(); inArg_ = other.inArg_.Clone(); outArg_ = other.outArg_.Clone(); argOrder_ = other.argOrder_.Clone(); attr_ = other.attr_.Clone(); summary_ = other.summary_; description_ = other.description_; descriptionPrefix_ = other.descriptionPrefix_; descriptionSuffix_ = other.descriptionSuffix_; _unknownFields = UnknownFieldSet.Clone(other._unknownFields); } [DebuggerNonUserCode] public ApiDef Clone() { return new ApiDef(this); } [DebuggerNonUserCode] public override bool Equals(object other) { return Equals(other as ApiDef); } [DebuggerNonUserCode] public bool Equals(ApiDef other) { if (other == null) { return false; } if (other == this) { return true; } if (GraphOpName != other.GraphOpName) { return false; } if (DeprecationMessage != other.DeprecationMessage) { return false; } if (DeprecationVersion != other.DeprecationVersion) { return false; } if (Visibility != other.Visibility) { return false; } if (!endpoint_.Equals(other.endpoint_)) { return false; } if (!inArg_.Equals(other.inArg_)) { return false; } if (!outArg_.Equals(other.outArg_)) { return false; } if (!argOrder_.Equals(other.argOrder_)) { return false; } if (!attr_.Equals(other.attr_)) { return false; } if (Summary != other.Summary) { return false; } if (Description != other.Description) { return false; } if (DescriptionPrefix != other.DescriptionPrefix) { return false; } if (DescriptionSuffix != other.DescriptionSuffix) { return false; } return object.Equals(_unknownFields, other._unknownFields); } [DebuggerNonUserCode] public override int GetHashCode() { int num = 1; if (GraphOpName.Length != 0) { num ^= GraphOpName.GetHashCode(); } if (DeprecationMessage.Length != 0) { num ^= DeprecationMessage.GetHashCode(); } if (DeprecationVersion != 0) { num ^= DeprecationVersion.GetHashCode(); } if (Visibility != Types.Visibility.DefaultVisibility) { num ^= Visibility.GetHashCode(); } num ^= ((object)endpoint_).GetHashCode(); num ^= ((object)inArg_).GetHashCode(); num ^= ((object)outArg_).GetHashCode(); num ^= ((object)argOrder_).GetHashCode(); num ^= ((object)attr_).GetHashCode(); if (Summary.Length != 0) { num ^= Summary.GetHashCode(); } if (Description.Length != 0) { num ^= Description.GetHashCode(); } if (DescriptionPrefix.Length != 0) { num ^= DescriptionPrefix.GetHashCode(); } if (DescriptionSuffix.Length != 0) { num ^= DescriptionSuffix.GetHashCode(); } if (_unknownFields != null) { num ^= ((object)_unknownFields).GetHashCode(); } return num; } [DebuggerNonUserCode] public override string ToString() { return JsonFormatter.ToDiagnosticString((IMessage)(object)this); } [DebuggerNonUserCode] public void WriteTo(CodedOutputStream output) { if (GraphOpName.Length != 0) { output.WriteRawTag((byte)10); output.WriteString(GraphOpName); } if (Visibility != Types.Visibility.DefaultVisibility) { output.WriteRawTag((byte)16); output.WriteEnum((int)Visibility); } endpoint_.WriteTo(output, _repeated_endpoint_codec); inArg_.WriteTo(output, _repeated_inArg_codec); outArg_.WriteTo(output, _repeated_outArg_codec); attr_.WriteTo(output, _repeated_attr_codec); if (Summary.Length != 0) { output.WriteRawTag((byte)58); output.WriteString(Summary); } if (Description.Length != 0) { output.WriteRawTag((byte)66); output.WriteString(Description); } if (DescriptionPrefix.Length != 0) { output.WriteRawTag((byte)74); output.WriteString(DescriptionPrefix); } if (DescriptionSuffix.Length != 0) { output.WriteRawTag((byte)82); output.WriteString(DescriptionSuffix); } argOrder_.WriteTo(output, _repeated_argOrder_codec); if (DeprecationMessage.Length != 0) { output.WriteRawTag((byte)98); output.WriteString(DeprecationMessage); } if (DeprecationVersion != 0) { output.WriteRawTag((byte)104); output.WriteInt32(DeprecationVersion); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [DebuggerNonUserCode] public int CalculateSize() { int num = 0; if (GraphOpName.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(GraphOpName); } if (DeprecationMessage.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(DeprecationMessage); } if (DeprecationVersion != 0) { num += 1 + CodedOutputStream.ComputeInt32Size(DeprecationVersion); } if (Visibility != Types.Visibility.DefaultVisibility) { num += 1 + CodedOutputStream.ComputeEnumSize((int)Visibility); } num += endpoint_.CalculateSize(_repeated_endpoint_codec); num += inArg_.CalculateSize(_repeated_inArg_codec); num += outArg_.CalculateSize(_repeated_outArg_codec); num += argOrder_.CalculateSize(_repeated_argOrder_codec); num += attr_.CalculateSize(_repeated_attr_codec); if (Summary.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(Summary); } if (Description.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(Description); } if (DescriptionPrefix.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(DescriptionPrefix); } if (DescriptionSuffix.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(DescriptionSuffix); } if (_unknownFields != null) { num += _unknownFields.CalculateSize(); } return num; } [DebuggerNonUserCode] public void MergeFrom(ApiDef other) { if (other != null) { if (other.GraphOpName.Length != 0) { GraphOpName = other.GraphOpName; } if (other.DeprecationMessage.Length != 0) { DeprecationMessage = other.DeprecationMessage; } if (other.DeprecationVersion != 0) { DeprecationVersion = other.DeprecationVersion; } if (other.Visibility != Types.Visibility.DefaultVisibility) { Visibility = other.Visibility; } endpoint_.Add((IEnumerable<Types.Endpoint>)other.endpoint_); inArg_.Add((IEnumerable<Types.Arg>)other.inArg_); outArg_.Add((IEnumerable<Types.Arg>)other.outArg_); argOrder_.Add((IEnumerable<string>)other.argOrder_); attr_.Add((IEnumerable<Types.Attr>)other.attr_); if (other.Summary.Length != 0) { Summary = other.Summary; } if (other.Description.Length != 0) { Description = other.Description; } if (other.DescriptionPrefix.Length != 0) { DescriptionPrefix = other.DescriptionPrefix; } if (other.DescriptionSuffix.Length != 0) { DescriptionSuffix = other.DescriptionSuffix; } _unknownFields = UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } } [DebuggerNonUserCode] public void MergeFrom(CodedInputStream input) { uint num; while ((num = input.ReadTag()) != 0) { switch (num) { default: _unknownFields = UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10u: GraphOpName = input.ReadString(); break; case 16u: Visibility = (Types.Visibility)input.ReadEnum(); break; case 26u: endpoint_.AddEntriesFrom(input, _repeated_endpoint_codec); break; case 34u: inArg_.AddEntriesFrom(input, _repeated_inArg_codec); break; case 42u: outArg_.AddEntriesFrom(input, _repeated_outArg_codec); break; case 50u: attr_.AddEntriesFrom(input, _repeated_attr_codec); break; case 58u: Summary = input.ReadString(); break; case 66u: Description = input.ReadString(); break; case 74u: DescriptionPrefix = input.ReadString(); break; case 82u: DescriptionSuffix = input.ReadString(); break; case 90u: argOrder_.AddEntriesFrom(input, _repeated_argOrder_codec); break; case 98u: DeprecationMessage = input.ReadString(); break; case 104u: DeprecationVersion = input.ReadInt32(); break; } } } } public sealed class ApiDefs : IMessage<ApiDefs>, IMessage, IEquatable<ApiDefs>, IDeepCloneable<ApiDefs> { private static readonly MessageParser<ApiDefs> _parser = new MessageParser<ApiDefs>((Func<ApiDefs>)(() => new ApiDefs())); private UnknownFieldSet _unknownFields; public const int OpFieldNumber = 1; private static readonly FieldCodec<ApiDef> _repeated_op_codec = FieldCodec.ForMessage<ApiDef>(10u, ApiDef.Parser); private readonly RepeatedField<ApiDef> op_ = new RepeatedField<ApiDef>(); [DebuggerNonUserCode] public static MessageParser<ApiDefs> Parser => _parser; [DebuggerNonUserCode] public static MessageDescriptor Descriptor => ApiDefReflection.Descriptor.MessageTypes[1]; [DebuggerNonUserCode] MessageDescriptor IMessage.Descriptor => Descriptor; [DebuggerNonUserCode] public RepeatedField<ApiDef> Op => op_; [DebuggerNonUserCode] public ApiDefs() { } [DebuggerNonUserCode] public ApiDefs(ApiDefs other) : this() { op_ = other.op_.Clone(); _unknownFields = UnknownFieldSet.Clone(other._unknownFields); } [DebuggerNonUserCode] public ApiDefs Clone() { return new ApiDefs(this); } [DebuggerNonUserCode] public override bool Equals(object other) { return Equals(other as ApiDefs); } [DebuggerNonUserCode] public bool Equals(ApiDefs other) { if (other == null) { return false; } if (other == this) { return true; } if (!op_.Equals(other.op_)) { return false; } return object.Equals(_unknownFields, other._unknownFields); } [DebuggerNonUserCode] public override int GetHashCode() { int num = 1; num ^= ((object)op_).GetHashCode(); if (_unknownFields != null) { num ^= ((object)_unknownFields).GetHashCode(); } return num; } [DebuggerNonUserCode] public override string ToString() { return JsonFormatter.ToDiagnosticString((IMessage)(object)this); } [DebuggerNonUserCode] public void WriteTo(CodedOutputStream output) { op_.WriteTo(output, _repeated_op_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [DebuggerNonUserCode] public int CalculateSize() { int num = 0; num += op_.CalculateSize(_repeated_op_codec); if (_unknownFields != null) { num += _unknownFields.CalculateSize(); } return num; } [DebuggerNonUserCode] public void MergeFrom(ApiDefs other) { if (other != null) { op_.Add((IEnumerable<ApiDef>)other.op_); _unknownFields = UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } } [DebuggerNonUserCode] public void MergeFrom(CodedInputStream input) { uint num; while ((num = input.ReadTag()) != 0) { if (num != 10) { _unknownFields = UnknownFieldSet.MergeFieldFrom(_unknownFields, input); } else { op_.AddEntriesFrom(input, _repeated_op_codec); } } } } public static class AttrValueReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor => descriptor; static AttrValueReflection() { //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Expected O, but got Unknown //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Expected O, but got Unknown //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Expected O, but got Unknown descriptor = FileDescriptor.FromGeneratedCode(Convert.FromBase64String("Cil0ZW5zb3Jib2FyZC9jb21wYXQvcHJvdG8vYXR0cl92YWx1ZS5wcm90bxIL" + "dGVuc29yYm9hcmQaJXRlbnNvcmJvYXJkL2NvbXBhdC9wcm90by90ZW5zb3Iu" + "cHJvdG8aK3RlbnNvcmJvYXJkL2NvbXBhdC9wcm90by90ZW5zb3Jfc2hhcGUu" + "cHJvdG8aJHRlbnNvcmJvYXJkL2NvbXBhdC9wcm90by90eXBlcy5wcm90byKv" + "BAoJQXR0clZhbHVlEgsKAXMYAiABKAxIABILCgFpGAMgASgDSAASCwoBZhgE" + "IAEoAkgAEgsKAWIYBSABKAhIABIlCgR0eXBlGAYgASgOMhUudGVuc29yYm9h" + "cmQuRGF0YVR5cGVIABIuCgVzaGFwZRgHIAEoCzIdLnRlbnNvcmJvYXJkLlRl" + "bnNvclNoYXBlUHJvdG9IABIqCgZ0ZW5zb3IYCCABKAsyGC50ZW5zb3Jib2Fy" + "ZC5UZW5zb3JQcm90b0gAEjAKBGxpc3QYASABKAsyIC50ZW5zb3Jib2FyZC5B" + "dHRyVmFsdWUuTGlzdFZhbHVlSAASKQoEZnVuYxgKIAEoCzIZLnRlbnNvcmJv" + "YXJkLk5hbWVBdHRyTGlzdEgAEhUKC3BsYWNlaG9sZGVyGAkgASgJSAAa7QEK" + "CUxpc3RWYWx1ZRIJCgFzGAIgAygMEg0KAWkYAyADKANCAhABEg0KAWYYBCAD" + "KAJCAhABEg0KAWIYBSADKAhCAhABEicKBHR5cGUYBiADKA4yFS50ZW5zb3Ji" + "b2FyZC5EYXRhVHlwZUICEAESLAoFc2hhcGUYByADKAsyHS50ZW5zb3Jib2Fy" + "ZC5UZW5zb3JTaGFwZVByb3RvEigKBnRlbnNvchgIIAMoCzIYLnRlbnNvcmJv" + "YXJkLlRlbnNvclByb3RvEicKBGZ1bmMYCSADKAsyGS50ZW5zb3Jib2FyZC5O" + "YW1lQXR0ckxpc3RCBwoFdmFsdWUilAEKDE5hbWVBdHRyTGlzdBIMCgRuYW1l" + "GAEgASgJEjEKBGF0dHIYAiADKAsyIy50ZW5zb3Jib2FyZC5OYW1lQXR0ckxp" + "c3QuQXR0ckVudHJ5GkMKCUF0dHJFbnRyeRILCgNrZXkYASABKAkSJQoFdmFs" + "dWUYAiABKAsyFi50ZW5zb3Jib2FyZC5BdHRyVmFsdWU6AjgBQoMBChhvcmcu" + "dGVuc29yZmxvdy5mcmFtZXdvcmtCD0F0dHJWYWx1ZVByb3Rvc1ABWlFnaXRo" + "dWIuY29tL3RlbnNvcmZsb3cvdGVuc29yZmxvdy90ZW5zb3JmbG93L2dvL2Nv" + "cmUvZnJhbWV3b3JrL2F0dHJfdmFsdWVfZ29fcHJvdG/4AQFiBnByb3RvMw=="), (FileDescriptor[])(object)new FileDescriptor[3] { TensorReflection.Descriptor, TensorShapeReflection.Descriptor, TypesReflection.Descriptor }, new GeneratedClrTypeInfo((Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])(object)new GeneratedClrTypeInfo[2] { new GeneratedClrTypeInfo(typeof(AttrValue), (MessageParser)(object)AttrValue.Parser, new string[10] { "S", "I", "F", "B", "Type", "Shape", "Tensor", "List", "Func", "Placeholder" }, new string[1] { "Value" }, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])(object)new GeneratedClrTypeInfo[1] { new GeneratedClrTypeInfo(typeof(AttrValue.Types.ListValue), (MessageParser)(object)AttrValue.Types.ListValue.Parser, new string[8] { "S", "I", "F", "B", "Type", "Shape", "Tensor", "Func" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])null) }), new GeneratedClrTypeInfo(typeof(NameAttrList), (MessageParser)(object)NameAttrList.Parser, new string[2] { "Name", "Attr" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])(object)new GeneratedClrTypeInfo[1]) })); } } public sealed class AttrValue : IMessage<AttrValue>, IMessage, IEquatable<AttrValue>, IDeepCloneable<AttrValue> { public enum ValueOneofCase { None = 0, S = 2, I = 3, F = 4, B = 5, Type = 6, Shape = 7, Tensor = 8, List = 1, Func = 10, Placeholder = 9 } [DebuggerNonUserCode] public static class Types { public sealed class ListValue : IMessage<ListValue>, IMessage, IEquatable<ListValue>, IDeepCloneable<ListValue> { private static readonly MessageParser<ListValue> _parser = new MessageParser<ListValue>((Func<ListValue>)(() => new ListValue())); private UnknownFieldSet _unknownFields; public const int SFieldNumber = 2; private static readonly FieldCodec<ByteString> _repeated_s_codec = FieldCodec.ForBytes(18u); private readonly RepeatedField<ByteString> s_ = new RepeatedField<ByteString>(); public const int IFieldNumber = 3; private static readonly FieldCodec<long> _repeated_i_codec = FieldCodec.ForInt64(26u); private readonly RepeatedField<long> i_ = new RepeatedField<long>(); public const int FFieldNumber = 4; private static readonly FieldCodec<float> _repeated_f_codec = FieldCodec.ForFloat(34u); private readonly RepeatedField<float> f_ = new RepeatedField<float>(); public const int BFieldNumber = 5; private static readonly FieldCodec<bool> _repeated_b_codec = FieldCodec.ForBool(42u); private readonly RepeatedField<bool> b_ = new RepeatedField<bool>(); public const int TypeFieldNumber = 6; private static readonly FieldCodec<DataType> _repeated_type_codec = FieldCodec.ForEnum<DataType>(50u, (Func<DataType, int>)((DataType x) => (int)x), (Func<int, DataType>)((int x) => (DataType)x)); private readonly RepeatedField<DataType> type_ = new RepeatedField<DataType>(); public const int ShapeFieldNumber = 7; private static readonly FieldCodec<TensorShapeProto> _repeated_shape_codec = FieldCodec.ForMessage<TensorShapeProto>(58u, TensorShapeProto.Parser); private readonly RepeatedField<TensorShapeProto> shape_ = new RepeatedField<TensorShapeProto>(); public const int TensorFieldNumber = 8; private static readonly FieldCodec<TensorProto> _repeated_tensor_codec = FieldCodec.ForMessage<TensorProto>(66u, TensorProto.Parser); private readonly RepeatedField<TensorProto> tensor_ = new RepeatedField<TensorProto>(); public const int FuncFieldNumber = 9; private static readonly FieldCodec<NameAttrList> _repeated_func_codec = FieldCodec.ForMessage<NameAttrList>(74u, NameAttrList.Parser); private readonly RepeatedField<NameAttrList> func_ = new RepeatedField<NameAttrList>(); [DebuggerNonUserCode] public static MessageParser<ListValue> Parser => _parser; [DebuggerNonUserCode] public static MessageDescriptor Descriptor => AttrValue.Descriptor.NestedTypes[0]; [DebuggerNonUserCode] MessageDescriptor IMessage.Descriptor => Descriptor; [DebuggerNonUserCode] public RepeatedField<ByteString> S => s_; [DebuggerNonUserCode] public RepeatedField<long> I => i_; [DebuggerNonUserCode] public RepeatedField<float> F => f_; [DebuggerNonUserCode] public RepeatedField<bool> B => b_; [DebuggerNonUserCode] public RepeatedField<DataType> Type => type_; [DebuggerNonUserCode] public RepeatedField<TensorShapeProto> Shape => shape_; [DebuggerNonUserCode] public RepeatedField<TensorProto> Tensor => tensor_; [DebuggerNonUserCode] public RepeatedField<NameAttrList> Func => func_; [DebuggerNonUserCode] public ListValue() { } [DebuggerNonUserCode] public ListValue(ListValue other) : this() { s_ = other.s_.Clone(); i_ = other.i_.Clone(); f_ = other.f_.Clone(); b_ = other.b_.Clone(); type_ = other.type_.Clone(); shape_ = other.shape_.Clone(); tensor_ = other.tensor_.Clone(); func_ = other.func_.Clone(); _unknownFields = UnknownFieldSet.Clone(other._unknownFields); } [DebuggerNonUserCode] public ListValue Clone() { return new ListValue(this); } [DebuggerNonUserCode] public override bool Equals(object other) { return Equals(other as ListValue); } [DebuggerNonUserCode] public bool Equals(ListValue other) { if (other == null) { return false; } if (other == this) { return true; } if (!s_.Equals(other.s_)) { return false; } if (!i_.Equals(other.i_)) { return false; } if (!f_.Equals(other.f_)) { return false; } if (!b_.Equals(other.b_)) { return false; } if (!type_.Equals(other.type_)) { return false; } if (!shape_.Equals(other.shape_)) { return false; } if (!tensor_.Equals(other.tensor_)) { return false; } if (!func_.Equals(other.func_)) { return false; } return object.Equals(_unknownFields, other._unknownFields); } [DebuggerNonUserCode] public override int GetHashCode() { int num = 1; num ^= ((object)s_).GetHashCode(); num ^= ((object)i_).GetHashCode(); num ^= ((object)f_).GetHashCode(); num ^= ((object)b_).GetHashCode(); num ^= ((object)type_).GetHashCode(); num ^= ((object)shape_).GetHashCode(); num ^= ((object)tensor_).GetHashCode(); num ^= ((object)func_).GetHashCode(); if (_unknownFields != null) { num ^= ((object)_unknownFields).GetHashCode(); } return num; } [DebuggerNonUserCode] public override string ToString() { return JsonFormatter.ToDiagnosticString((IMessage)(object)this); } [DebuggerNonUserCode] public void WriteTo(CodedOutputStream output) { s_.WriteTo(output, _repeated_s_codec); i_.WriteTo(output, _repeated_i_codec); f_.WriteTo(output, _repeated_f_codec); b_.WriteTo(output, _repeated_b_codec); type_.WriteTo(output, _repeated_type_codec); shape_.WriteTo(output, _repeated_shape_codec); tensor_.WriteTo(output, _repeated_tensor_codec); func_.WriteTo(output, _repeated_func_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [DebuggerNonUserCode] public int CalculateSize() { int num = 0; num += s_.CalculateSize(_repeated_s_codec); num += i_.CalculateSize(_repeated_i_codec); num += f_.CalculateSize(_repeated_f_codec); num += b_.CalculateSize(_repeated_b_codec); num += type_.CalculateSize(_repeated_type_codec); num += shape_.CalculateSize(_repeated_shape_codec); num += tensor_.CalculateSize(_repeated_tensor_codec); num += func_.CalculateSize(_repeated_func_codec); if (_unknownFields != null) { num += _unknownFields.CalculateSize(); } return num; } [DebuggerNonUserCode] public void MergeFrom(ListValue other) { if (other != null) { s_.Add((IEnumerable<ByteString>)other.s_); i_.Add((IEnumerable<long>)other.i_); f_.Add((IEnumerable<float>)other.f_); b_.Add((IEnumerable<bool>)other.b_); type_.Add((IEnumerable<DataType>)other.type_); shape_.Add((IEnumerable<TensorShapeProto>)other.shape_); tensor_.Add((IEnumerable<TensorProto>)other.tensor_); func_.Add((IEnumerable<NameAttrList>)other.func_); _unknownFields = UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } } [DebuggerNonUserCode] public void MergeFrom(CodedInputStream input) { uint num; while ((num = input.ReadTag()) != 0) { switch (num) { default: _unknownFields = UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 18u: s_.AddEntriesFrom(input, _repeated_s_codec); break; case 24u: case 26u: i_.AddEntriesFrom(input, _repeated_i_codec); break; case 34u: case 37u: f_.AddEntriesFrom(input, _repeated_f_codec); break; case 40u: case 42u: b_.AddEntriesFrom(input, _repeated_b_codec); break; case 48u: case 50u: type_.AddEntriesFrom(input, _repeated_type_codec); break; case 58u: shape_.AddEntriesFrom(input, _repeated_shape_codec); break; case 66u: tensor_.AddEntriesFrom(input, _repeated_tensor_codec); break; case 74u: func_.AddEntriesFrom(input, _repeated_func_codec); break; } } } } } private static readonly MessageParser<AttrValue> _parser = new MessageParser<AttrValue>((Func<AttrValue>)(() => new AttrValue())); private UnknownFieldSet _unknownFields; public const int SFieldNumber = 2; public const int IFieldNumber = 3; public const int FFieldNumber = 4; public const int BFieldNumber = 5; public const int TypeFieldNumber = 6; public const int ShapeFieldNumber = 7; public const int TensorFieldNumber = 8; public const int ListFieldNumber = 1; public const int FuncFieldNumber = 10; public const int PlaceholderFieldNumber = 9; private object value_; private ValueOneofCase valueCase_; [DebuggerNonUserCode] public static MessageParser<AttrValue> Parser => _parser; [DebuggerNonUserCode] public static MessageDescriptor Descriptor => AttrValueReflection.Descriptor.MessageTypes[0]; [DebuggerNonUserCode] MessageDescriptor IMessage.Descriptor => Descriptor; [DebuggerNonUserCode] public ByteString S { get { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown if (valueCase_ != ValueOneofCase.S) { return ByteString.Empty; } return (ByteString)value_; } set { value_ = ProtoPreconditions.CheckNotNull<ByteString>(value, "value"); valueCase_ = ValueOneofCase.S; } } [DebuggerNonUserCode] public long I { get { if (valueCase_ != ValueOneofCase.I) { return 0L; } return (long)value_; } set { value_ = value; valueCase_ = ValueOneofCase.I; } } [DebuggerNonUserCode] public float F { get { if (valueCase_ != ValueOneofCase.F) { return 0f; } return (float)value_; } set { value_ = value; valueCase_ = ValueOneofCase.F; } } [DebuggerNonUserCode] public bool B { get { if (valueCase_ != ValueOneofCase.B) { return false; } return (bool)value_; } set { value_ = value; valueCase_ = ValueOneofCase.B; } } [DebuggerNonUserCode] public DataType Type { get { if (valueCase_ != ValueOneofCase.Type) { return DataType.DtInvalid; } return (DataType)value_; } set { value_ = value; valueCase_ = ValueOneofCase.Type; } } [DebuggerNonUserCode] public TensorShapeProto Shape { get { if (valueCase_ != ValueOneofCase.Shape) { return null; } return (TensorShapeProto)value_; } set { value_ = value; valueCase_ = ((value != null) ? ValueOneofCase.Shape : ValueOneofCase.None); } } [DebuggerNonUserCode] public TensorProto Tensor { get { if (valueCase_ != ValueOneofCase.Tensor) { return null; } return (TensorProto)value_; } set { value_ = value; valueCase_ = ((value != null) ? ValueOneofCase.Tensor : ValueOneofCase.None); } } [DebuggerNonUserCode] public Types.ListValue List { get { if (valueCase_ != ValueOneofCase.List) { return null; } return (Types.ListValue)value_; } set { value_ = value; valueCase_ = ((value != null) ? ValueOneofCase.List : ValueOneofCase.None); } } [DebuggerNonUserCode] public NameAttrList Func { get { if (valueCase_ != ValueOneofCase.Func) { return null; } return (NameAttrList)value_; } set { value_ = value; valueCase_ = ((value != null) ? ValueOneofCase.Func : ValueOneofCase.None); } } [DebuggerNonUserCode] public string Placeholder { get { if (valueCase_ != ValueOneofCase.Placeholder) { return ""; } return (string)value_; } set { value_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); valueCase_ = ValueOneofCase.Placeholder; } } [DebuggerNonUserCode] public ValueOneofCase ValueCase => valueCase_; [DebuggerNonUserCode] public AttrValue() { } [DebuggerNonUserCode] public AttrValue(AttrValue other) : this() { switch (other.ValueCase) { case ValueOneofCase.S: S = other.S; break; case ValueOneofCase.I: I = other.I; break; case ValueOneofCase.F: F = other.F; break; case ValueOneofCase.B: B = other.B; break; case ValueOneofCase.Type: Type = other.Type; break; case ValueOneofCase.Shape: Shape = other.Shape.Clone(); break; case ValueOneofCase.Tensor: Tensor = other.Tensor.Clone(); break; case ValueOneofCase.List: List = other.List.Clone(); break; case ValueOneofCase.Func: Func = other.Func.Clone(); break; case ValueOneofCase.Placeholder: Placeholder = other.Placeholder; break; } _unknownFields = UnknownFieldSet.Clone(other._unknownFields); } [DebuggerNonUserCode] public AttrValue Clone() { return new AttrValue(this); } [DebuggerNonUserCode] public void ClearValue() { valueCase_ = ValueOneofCase.None; value_ = null; } [DebuggerNonUserCode] public override bool Equals(object other) { return Equals(other as AttrValue); } [DebuggerNonUserCode] public bool Equals(AttrValue other) { if (other == null) { return false; } if (other == this) { return true; } if (S != other.S) { return false; } if (I != other.I) { return false; } if (!ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(F, other.F)) { return false; } if (B != other.B) { return false; } if (Type != other.Type) { return false; } if (!object.Equals(Shape, other.Shape)) { return false; } if (!object.Equals(Tensor, other.Tensor)) { return false; } if (!object.Equals(List, other.List)) { return false; } if (!object.Equals(Func, other.Func)) { return false; } if (Placeholder != other.Placeholder) { return false; } if (ValueCase != other.ValueCase) { return false; } return object.Equals(_unknownFields, other._unknownFields); } [DebuggerNonUserCode] public override int GetHashCode() { int num = 1; if (valueCase_ == ValueOneofCase.S) { num ^= ((object)S).GetHashCode(); } if (valueCase_ == ValueOneofCase.I) { num ^= I.GetHashCode(); } if (valueCase_ == ValueOneofCase.F) { num ^= ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(F); } if (valueCase_ == ValueOneofCase.B) { num ^= B.GetHashCode(); } if (valueCase_ == ValueOneofCase.Type) { num ^= Type.GetHashCode(); } if (valueCase_ == ValueOneofCase.Shape) { num ^= Shape.GetHashCode(); } if (valueCase_ == ValueOneofCase.Tensor) { num ^= Tensor.GetHashCode(); } if (valueCase_ == ValueOneofCase.List) { num ^= List.GetHashCode(); } if (valueCase_ == ValueOneofCase.Func) { num ^= Func.GetHashCode(); } if (valueCase_ == ValueOneofCase.Placeholder) { num ^= Placeholder.GetHashCode(); } num ^= (int)valueCase_; if (_unknownFields != null) { num ^= ((object)_unknownFields).GetHashCode(); } return num; } [DebuggerNonUserCode] public override string ToString() { return JsonFormatter.ToDiagnosticString((IMessage)(object)this); } [DebuggerNonUserCode] public void WriteTo(CodedOutputStream output) { if (valueCase_ == ValueOneofCase.List) { output.WriteRawTag((byte)10); output.WriteMessage((IMessage)(object)List); } if (valueCase_ == ValueOneofCase.S) { output.WriteRawTag((byte)18); output.WriteBytes(S); } if (valueCase_ == ValueOneofCase.I) { output.WriteRawTag((byte)24); output.WriteInt64(I); } if (valueCase_ == ValueOneofCase.F) { output.WriteRawTag((byte)37); output.WriteFloat(F); } if (valueCase_ == ValueOneofCase.B) { output.WriteRawTag((byte)40); output.WriteBool(B); } if (valueCase_ == ValueOneofCase.Type) { output.WriteRawTag((byte)48); output.WriteEnum((int)Type); } if (valueCase_ == ValueOneofCase.Shape) { output.WriteRawTag((byte)58); output.WriteMessage((IMessage)(object)Shape); } if (valueCase_ == ValueOneofCase.Tensor) { output.WriteRawTag((byte)66); output.WriteMessage((IMessage)(object)Tensor); } if (valueCase_ == ValueOneofCase.Placeholder) { output.WriteRawTag((byte)74); output.WriteString(Placeholder); } if (valueCase_ == ValueOneofCase.Func) { output.WriteRawTag((byte)82); output.WriteMessage((IMessage)(object)Func); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [DebuggerNonUserCode] public int CalculateSize() { int num = 0; if (valueCase_ == ValueOneofCase.S) { num += 1 + CodedOutputStream.ComputeBytesSize(S); } if (valueCase_ == ValueOneofCase.I) { num += 1 + CodedOutputStream.ComputeInt64Size(I); } if (valueCase_ == ValueOneofCase.F) { num += 5; } if (valueCase_ == ValueOneofCase.B) { num += 2; } if (valueCase_ == ValueOneofCase.Type) { num += 1 + CodedOutputStream.ComputeEnumSize((int)Type); } if (valueCase_ == ValueOneofCase.Shape) { num += 1 + CodedOutputStream.ComputeMessageSize((IMessage)(object)Shape); } if (valueCase_ == ValueOneofCase.Tensor) { num += 1 + CodedOutputStream.ComputeMessageSize((IMessage)(object)Tensor); } if (valueCase_ == ValueOneofCase.List) { num += 1 + CodedOutputStream.ComputeMessageSize((IMessage)(object)List); } if (valueCase_ == ValueOneofCase.Func) { num += 1 + CodedOutputStream.ComputeMessageSize((IMessage)(object)Func); } if (valueCase_ == ValueOneofCase.Placeholder) { num += 1 + CodedOutputStream.ComputeStringSize(Placeholder); } if (_unknownFields != null) { num += _unknownFields.CalculateSize(); } return num; } [DebuggerNonUserCode] public void MergeFrom(AttrValue other) { if (other == null) { return; } switch (other.ValueCase) { case ValueOneofCase.S: S = other.S; break; case ValueOneofCase.I: I = other.I; break; case ValueOneofCase.F: F = other.F; break; case ValueOneofCase.B: B = other.B; break; case ValueOneofCase.Type: Type = other.Type; break; case ValueOneofCase.Shape: if (Shape == null) { Shape = new TensorShapeProto(); } Shape.MergeFrom(other.Shape); break; case ValueOneofCase.Tensor: if (Tensor == null) { Tensor = new TensorProto(); } Tensor.MergeFrom(other.Tensor); break; case ValueOneofCase.List: if (List == null) { List = new Types.ListValue(); } List.MergeFrom(other.List); break; case ValueOneofCase.Func: if (Func == null) { Func = new NameAttrList(); } Func.MergeFrom(other.Func); break; case ValueOneofCase.Placeholder: Placeholder = other.Placeholder; break; } _unknownFields = UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [DebuggerNonUserCode] public void MergeFrom(CodedInputStream input) { uint num; while ((num = input.ReadTag()) != 0) { switch (num) { default: _unknownFields = UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10u: { Types.ListValue listValue = new Types.ListValue(); if (valueCase_ == ValueOneofCase.List) { listValue.MergeFrom(List); } input.ReadMessage((IMessage)(object)listValue); List = listValue; break; } case 18u: S = input.ReadBytes(); break; case 24u: I = input.ReadInt64(); break; case 37u: F = input.ReadFloat(); break; case 40u: B = input.ReadBool(); break; case 48u: value_ = input.ReadEnum(); valueCase_ = ValueOneofCase.Type; break; case 58u: { TensorShapeProto tensorShapeProto = new TensorShapeProto(); if (valueCase_ == ValueOneofCase.Shape) { tensorShapeProto.MergeFrom(Shape); } input.ReadMessage((IMessage)(object)tensorShapeProto); Shape = tensorShapeProto; break; } case 66u: { TensorProto tensorProto = new TensorProto(); if (valueCase_ == ValueOneofCase.Tensor) { tensorProto.MergeFrom(Tensor); } input.ReadMessage((IMessage)(object)tensorProto); Tensor = tensorProto; break; } case 74u: Placeholder = input.ReadString(); break; case 82u: { NameAttrList nameAttrList = new NameAttrList(); if (valueCase_ == ValueOneofCase.Func) { nameAttrList.MergeFrom(Func); } input.ReadMessage((IMessage)(object)nameAttrList); Func = nameAttrList; break; } } } } } public sealed class NameAttrList : IMessage<NameAttrList>, IMessage, IEquatable<NameAttrList>, IDeepCloneable<NameAttrList> { private static readonly MessageParser<NameAttrList> _parser = new MessageParser<NameAttrList>((Func<NameAttrList>)(() => new NameAttrList())); private UnknownFieldSet _unknownFields; public const int NameFieldNumber = 1; private string name_ = ""; public const int AttrFieldNumber = 2; private static readonly Codec<string, AttrValue> _map_attr_codec = new Codec<string, AttrValue>(FieldCodec.ForString(10u, ""), FieldCodec.ForMessage<AttrValue>(18u, AttrValue.Parser), 18u); private readonly MapField<string, AttrValue> attr_ = new MapField<string, AttrValue>(); [DebuggerNonUserCode] public static MessageParser<NameAttrList> Parser => _parser; [DebuggerNonUserCode] public static MessageDescriptor Descriptor => AttrValueReflection.Descriptor.MessageTypes[1]; [DebuggerNonUserCode] MessageDescriptor IMessage.Descriptor => Descriptor; [DebuggerNonUserCode] public string Name { get { return name_; } set { name_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public MapField<string, AttrValue> Attr => attr_; [DebuggerNonUserCode] public NameAttrList() { } [DebuggerNonUserCode] public NameAttrList(NameAttrList other) : this() { name_ = other.name_; attr_ = other.attr_.Clone(); _unknownFields = UnknownFieldSet.Clone(other._unknownFields); } [DebuggerNonUserCode] public NameAttrList Clone() { return new NameAttrList(this); } [DebuggerNonUserCode] public override bool Equals(object other) { return Equals(other as NameAttrList); } [DebuggerNonUserCode] public bool Equals(NameAttrList other) { if (other == null) { return false; } if (other == this) { return true; } if (Name != other.Name) { return false; } if (!Attr.Equals(other.Attr)) { return false; } return object.Equals(_unknownFields, other._unknownFields); } [DebuggerNonUserCode] public override int GetHashCode() { int num = 1; if (Name.Length != 0) { num ^= Name.GetHashCode(); } num ^= ((object)Attr).GetHashCode(); if (_unknownFields != null) { num ^= ((object)_unknownFields).GetHashCode(); } return num; } [DebuggerNonUserCode] public override string ToString() { return JsonFormatter.ToDiagnosticString((IMessage)(object)this); } [DebuggerNonUserCode] public void WriteTo(CodedOutputStream output) { if (Name.Length != 0) { output.WriteRawTag((byte)10); output.WriteString(Name); } attr_.WriteTo(output, _map_attr_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [DebuggerNonUserCode] public int CalculateSize() { int num = 0; if (Name.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(Name); } num += attr_.CalculateSize(_map_attr_codec); if (_unknownFields != null) { num += _unknownFields.CalculateSize(); } return num; } [DebuggerNonUserCode] public void MergeFrom(NameAttrList other) { if (other != null) { if (other.Name.Length != 0) { Name = other.Name; } attr_.Add((IDictionary<string, AttrValue>)other.attr_); _unknownFields = UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } } [DebuggerNonUserCode] public void MergeFrom(CodedInputStream input) { uint num; while ((num = input.ReadTag()) != 0) { switch (num) { default: _unknownFields = UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10u: Name = input.ReadString(); break; case 18u: attr_.AddEntriesFrom(input, _map_attr_codec); break; } } } } public static class ClusterReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor => descriptor; static ClusterReflection() { //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown descriptor = FileDescriptor.FromGeneratedCode(Convert.FromBase64String("CiZ0ZW5zb3Jib2FyZC9jb21wYXQvcHJvdG8vY2x1c3Rlci5wcm90bxILdGVu" + "c29yYm9hcmQicwoGSm9iRGVmEgwKBG5hbWUYASABKAkSLQoFdGFza3MYAiAD" + "KAsyHi50ZW5zb3Jib2FyZC5Kb2JEZWYuVGFza3NFbnRyeRosCgpUYXNrc0Vu" + "dHJ5EgsKA2tleRgBIAEoBRINCgV2YWx1ZRgCIAEoCToCOAEiLgoKQ2x1c3Rl" + "ckRlZhIgCgNqb2IYASADKAsyEy50ZW5zb3Jib2FyZC5Kb2JEZWZChwEKGm9y" + "Zy50ZW5zb3JmbG93LmRpc3RydW50aW1lQg1DbHVzdGVyUHJvdG9zUAFaVWdp" + "dGh1Yi5jb20vdGVuc29yZmxvdy90ZW5zb3JmbG93L3RlbnNvcmZsb3cvZ28v" + "Y29yZS9wcm90b2J1Zi9mb3JfY29yZV9wcm90b3NfZ29fcHJvdG/4AQFiBnBy" + "b3RvMw=="), (FileDescriptor[])(object)new FileDescriptor[0], new GeneratedClrTypeInfo((Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])(object)new GeneratedClrTypeInfo[2] { new GeneratedClrTypeInfo(typeof(JobDef), (MessageParser)(object)JobDef.Parser, new string[2] { "Name", "Tasks" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])(object)new GeneratedClrTypeInfo[1]), new GeneratedClrTypeInfo(typeof(ClusterDef), (MessageParser)(object)ClusterDef.Parser, new string[1] { "Job" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])null) })); } } public sealed class JobDef : IMessage<JobDef>, IMessage, IEquatable<JobDef>, IDeepCloneable<JobDef> { private static readonly MessageParser<JobDef> _parser = new MessageParser<JobDef>((Func<JobDef>)(() => new JobDef())); private UnknownFieldSet _unknownFields; public const int NameFieldNumber = 1; private string name_ = ""; public const int TasksFieldNumber = 2; private static readonly Codec<int, string> _map_tasks_codec = new Codec<int, string>(FieldCodec.ForInt32(8u, 0), FieldCodec.ForString(18u, ""), 18u); private readonly MapField<int, string> tasks_ = new MapField<int, string>(); [DebuggerNonUserCode] public static MessageParser<JobDef> Parser => _parser; [DebuggerNonUserCode] public static MessageDescriptor Descriptor => ClusterReflection.Descriptor.MessageTypes[0]; [DebuggerNonUserCode] MessageDescriptor IMessage.Descriptor => Descriptor; [DebuggerNonUserCode] public string Name { get { return name_; } set { name_ = ProtoPreconditions.CheckNotNull<string>(value, "value"); } } [DebuggerNonUserCode] public MapField<int, string> Tasks => tasks_; [DebuggerNonUserCode] public JobDef() { } [DebuggerNonUserCode] public JobDef(JobDef other) : this() { name_ = other.name_; tasks_ = other.tasks_.Clone(); _unknownFields = UnknownFieldSet.Clone(other._unknownFields); } [DebuggerNonUserCode] public JobDef Clone() { return new JobDef(this); } [DebuggerNonUserCode] public override bool Equals(object other) { return Equals(other as JobDef); } [DebuggerNonUserCode] public bool Equals(JobDef other) { if (other == null) { return false; } if (other == this) { return true; } if (Name != other.Name) { return false; } if (!Tasks.Equals(other.Tasks)) { return false; } return object.Equals(_unknownFields, other._unknownFields); } [DebuggerNonUserCode] public override int GetHashCode() { int num = 1; if (Name.Length != 0) { num ^= Name.GetHashCode(); } num ^= ((object)Tasks).GetHashCode(); if (_unknownFields != null) { num ^= ((object)_unknownFields).GetHashCode(); } return num; } [DebuggerNonUserCode] public override string ToString() { return JsonFormatter.ToDiagnosticString((IMessage)(object)this); } [DebuggerNonUserCode] public void WriteTo(CodedOutputStream output) { if (Name.Length != 0) { output.WriteRawTag((byte)10); output.WriteString(Name); } tasks_.WriteTo(output, _map_tasks_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [DebuggerNonUserCode] public int CalculateSize() { int num = 0; if (Name.Length != 0) { num += 1 + CodedOutputStream.ComputeStringSize(Name); } num += tasks_.CalculateSize(_map_tasks_codec); if (_unknownFields != null) { num += _unknownFields.CalculateSize(); } return num; } [DebuggerNonUserCode] public void MergeFrom(JobDef other) { if (other != null) { if (other.Name.Length != 0) { Name = other.Name; } tasks_.Add((IDictionary<int, string>)other.tasks_); _unknownFields = UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } } [DebuggerNonUserCode] public void MergeFrom(CodedInputStream input) { uint num; while ((num = input.ReadTag()) != 0) { switch (num) { default: _unknownFields = UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10u: Name = input.ReadString(); break; case 18u: tasks_.AddEntriesFrom(input, _map_tasks_codec); break; } } } } public sealed class ClusterDef : IMessage<ClusterDef>, IMessage, IEquatable<ClusterDef>, IDeepCloneable<ClusterDef> { private static readonly MessageParser<ClusterDef> _parser = new MessageParser<ClusterDef>((Func<ClusterDef>)(() => new ClusterDef())); private UnknownFieldSet _unknownFields; public const int JobFieldNumber = 1; private static readonly FieldCodec<JobDef> _repeated_job_codec = FieldCodec.ForMessage<JobDef>(10u, JobDef.Parser); private readonly RepeatedField<JobDef> job_ = new RepeatedField<JobDef>(); [DebuggerNonUserCode] public static MessageParser<ClusterDef> Parser => _parser; [DebuggerNonUserCode] public static MessageDescriptor Descriptor => ClusterReflection.Descriptor.MessageTypes[1]; [DebuggerNonUserCode] MessageDescriptor IMessage.Descriptor => Descriptor; [DebuggerNonUserCode] public RepeatedField<JobDef> Job => job_; [DebuggerNonUserCode] public ClusterDef() { } [DebuggerNonUserCode] public ClusterDef(ClusterDef other) : this() { job_ = other.job_.Clone(); _unknownFields = UnknownFieldSet.Clone(other._unknownFields); } [DebuggerNonUserCode] public ClusterDef Clone() { return new ClusterDef(this); } [DebuggerNonUserCode] public override bool Equals(object other) { return Equals(other as ClusterDef); } [DebuggerNonUserCode] public bool Equals(ClusterDef other) { if (other == null) { return false; } if (other == this) { return true; } if (!job_.Equals(other.job_)) { return false; } return object.Equals(_unknownFields, other._unknownFields); } [DebuggerNonUserCode] public override int GetHashCode() { int num = 1; num ^= ((object)job_).GetHashCode(); if (_unknownFields != null) { num ^= ((object)_unknownFields).GetHashCode(); } return num; } [DebuggerNonUserCode] public override string ToString() { return JsonFormatter.ToDiagnosticString((IMessage)(object)this); } [DebuggerNonUserCode] public void WriteTo(CodedOutputStream output) { job_.WriteTo(output, _repeated_job_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } } [DebuggerNonUserCode] public int CalculateSize() { int num = 0; num += job_.CalculateSize(_repeated_job_codec); if (_unknownFields != null) { num += _unknownFields.CalculateSize(); } return num; } [DebuggerNonUserCode] public void MergeFrom(ClusterDef other) { if (other != null) { job_.Add((IEnumerable<JobDef>)other.job_); _unknownFields = UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } } [DebuggerNonUserCode] public void MergeFrom(CodedInputStream input) { uint num; while ((num = input.ReadTag()) != 0) { if (num != 10) { _unknownFields = UnknownFieldSet.MergeFieldFrom(_unknownFields, input); } else { job_.AddEntriesFrom(input, _repeated_job_codec); } } } } public static class ConfigReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor => descriptor; static ConfigReflection() { //IL_05f9: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Expected O, but got Unknown //IL_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_0605: Expected O, but got Unknown //IL_0605: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Expected O, but got Unknown //IL_067d: Unknown result type (might be due to invalid IL or missing references) //IL_0683: Expected O, but got Unknown //IL_06e7: Unknown result type (might be due to invalid IL or missing references) //IL_06ed: Expected O, but got Unknown //IL_0718: Unknown result type (might be due to invalid IL or missing references) //IL_071e: Expected O, but got Unknown //IL_0769: Unknown result type (might be due to invalid IL or missing references) //IL_076f: Expected O, but got Unknown //IL_079a: Unknown result type (might be due to invalid IL or missing references) //IL_07a0: Expected O, but got Unknown //IL_092a: Unknown result type (might be due to invalid IL or missing references) //IL_0930: Expected O, but got Unknown //IL_0930: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Expected O, but got Unknown //IL_09fb: Unknown result type (might be due to invalid IL or missing references) //IL_0a01: Expected O, but got Unknown //IL_0a01: Unknown result type (might be due to invalid IL or missing references) //IL_0a07: Expected O, but got Unknown //IL_0a07: Unknown result type (might be due to invalid IL or missing references) //IL_0a0d: Expected O, but got Unknown //IL_0a80: Unknown result type (might be due to invalid IL or missing references) //IL_0a86: Expected O, but got Unknown //IL_0a86: Unknown result type (might be due to invalid IL or missing references) //IL_0a8c: Expected O, but got Unknown //IL_0ab8: Unknown result type (might be due to invalid IL or missing references) //IL_0abe: Expected O, but got Unknown //IL_0b1f: Unknown result type (might be due to invalid IL or missing references) //IL_0b25: Expected O, but got Unknown //IL_0b25: Unknown result type (might be due to invalid IL or missing references) //IL_0b2f: Expected O, but got Unknown descriptor = FileDescriptor.FromGeneratedCode(Convert.FromBase64String("CiV0ZW5zb3Jib2FyZC9jb21wYXQvcHJvdG8vY29uZmlnLnByb3RvEgt0ZW5z" + "b3Jib2FyZBopdGVuc29yYm9hcmQvY29tcGF0L3Byb3RvL2Nvc3RfZ3JhcGgu" + "cHJvdG8aJHRlbnNvcmJvYXJkL2NvbXBhdC9wcm90by9ncmFwaC5wcm90bxop" + "dGVuc29yYm9hcmQvY29tcGF0L3Byb3RvL3N0ZXBfc3RhdHMucHJvdG8aJnRl" + "bnNvcmJvYXJkL2NvbXBhdC9wcm90by9jbHVzdGVyLnByb3RvGjJ0ZW5zb3Ji" + "b2FyZC9jb21wYXQvcHJvdG8vY29vcmRpbmF0aW9uX2NvbmZpZy5wcm90bxok" + "dGVuc29yYm9hcmQvY29tcGF0L3Byb3RvL2RlYnVnLnByb3RvGi50ZW5zb3Ji" + "b2FyZC9jb21wYXQvcHJvdG8vcmV3cml0ZXJfY29uZmlnLnByb3RvIsEGCgpH" + "UFVPcHRpb25zEicKH3Blcl9wcm9jZXNzX2dwdV9tZW1vcnlfZnJhY3Rpb24Y" + "ASABKAESFAoMYWxsb3dfZ3Jvd3RoGAQgASgIEhYKDmFsbG9jYXRvcl90eXBl" + "GAIgASgJEh8KF2RlZmVycmVkX2RlbGV0aW9uX2J5dGVzGAMgASgDEhsKE3Zp" + "c2libGVfZGV2aWNlX2xpc3QYBSABKAkSIgoacG9sbGluZ19hY3RpdmVfZGVs" + "YXlfdXNlY3MYBiABKAUSJAoccG9sbGluZ19pbmFjdGl2ZV9kZWxheV9tc2Vj" + "cxgHIAEoBRIcChRmb3JjZV9ncHVfY29tcGF0aWJsZRgIIAEoCBI6CgxleHBl" + "cmltZW50YWwYCSABKAsyJC50ZW5zb3Jib2FyZC5HUFVPcHRpb25zLkV4cGVy" + "aW1lbnRhbBr5AwoMRXhwZXJpbWVudGFsEkwKD3ZpcnR1YWxfZGV2aWNlcxgB" + "IAMoCzIzLnRlbnNvcmJvYXJkLkdQVU9wdGlvbnMuRXhwZXJpbWVudGFsLlZp" + "cnR1YWxEZXZpY2VzEhoKEnVzZV91bmlmaWVkX21lbW9yeRgCIAEoCBIjChtu" + "dW1fZGV2X3RvX2Rldl9jb3B5X3N0cmVhbXMYAyABKAUSHQoVY29sbGVjdGl2" + "ZV9yaW5nX29yZGVyGAQgASgJEh0KFXRpbWVzdGFtcGVkX2FsbG9jYXRvchgF" + "IAEoCBIjChtrZXJuZWxfdHJhY2tlcl9tYXhfaW50ZXJ2YWwYByABKAUSIAoY" + "a2VybmVsX3RyYWNrZXJfbWF4X2J5dGVzGAggASgFEiIKGmtlcm5lbF90cmFj" + "a2VyX21heF9wZW5kaW5nGAkgASgFEicKH2ludGVybmFsX2ZyYWdtZW50YXRp" + "b25fZnJhY3Rpb24YCiABKAESHQoVdXNlX2N1ZGFfbWFsbG9jX2FzeW5jGAsg" + "ASgIEiwKJGRpc2FsbG93X3JldHJ5X29uX2FsbG9jYXRpb25fZmFpbHVyZRgM" + "IAEoCBo7Cg5WaXJ0dWFsRGV2aWNlcxIXCg9tZW1vcnlfbGltaXRfbWIYASAD" + "KAISEAoIcHJpb3JpdHkYAiADKAUinwMKEE9wdGltaXplck9wdGlvbnMSKwoj" + "ZG9fY29tbW9uX3N1YmV4cHJlc3Npb25fZWxpbWluYXRpb24YASABKAgSGwoT" + "ZG9fY29uc3RhbnRfZm9sZGluZxgCIAEoCBIkChxtYXhfZm9sZGVkX2NvbnN0" + "YW50X2luX2J5dGVzGAYgASgDEhwKFGRvX2Z1bmN0aW9uX2lubGluaW5nGAQg" + "ASgIEjYKCW9wdF9sZXZlbBgDIAEoDjIjLnRlbnNvcmJvYXJkLk9wdGltaXpl" + "ck9wdGlvbnMuTGV2ZWwSRgoQZ2xvYmFsX2ppdF9sZXZlbBgFIAEoDjIsLnRl" + "bnNvcmJvYXJkLk9wdGltaXplck9wdGlvbnMuR2xvYmFsSml0TGV2ZWwSFgoO" + "Y3B1X2dsb2JhbF9qaXQYByABKAgiIAoFTGV2ZWwSBgoCTDEQABIPCgJMMBD/" + "//////////8BIkMKDkdsb2JhbEppdExldmVsEgsKB0RFRkFVTFQQABIQCgNP" + "RkYQ////////////ARIICgRPTl8xEAESCAoET05fMhACIvACCgxHcmFwaE9w" + "dGlvbnMSHgoWZW5hYmxlX3JlY3Zfc2NoZWR1bGluZxgCIAEoCBI4ChFvcHRp" + "bWl6ZXJfb3B0aW9ucxgDIAEoCzIdLnRlbnNvcmJvYXJkLk9wdGltaXplck9w" + "dGlvbnMSGAoQYnVpbGRfY29zdF9tb2RlbBgEIAEoAxIeChZidWlsZF9jb3N0" + "X21vZGVsX2FmdGVyGAkgASgDEhQKDGluZmVyX3NoYXBlcxgFIAEoCBIaChJw" + "bGFjZV9wcnVuZWRfZ3JhcGgYBiABKAgSIAoYZW5hYmxlX2JmbG9hdDE2X3Nl" + "bmRyZWN2GAcgASgIEhUKDXRpbWVsaW5lX3N0ZXAYCCABKAUSNAoPcmV3cml0" + "ZV9vcHRpb25zGAogASgLMhsudGVuc29yYm9hcmQuUmV3cml0ZXJDb25maWdK" + "BAgBEAJSJXNraXBfY29tbW9uX3N1YmV4cHJlc3Npb25fZWxpbWluYXRpb24i" + "QQoVVGhyZWFkUG9vbE9wdGlvblByb3RvEhMKC251bV90aHJlYWRzGAEgASgF" + "EhMKC2dsb2JhbF9uYW1lGAIgASgJItUBCgpSUENPcHRpb25zEiQKHHVzZV9y" + "cGNfZm9yX2lucHJvY2Vzc19tYXN0ZXIYASABKAgSHQoVY29tcHJlc3Npb25f" + "YWxnb3JpdGhtGAIgASgJEhkKEWNvbXByZXNzaW9uX2xldmVsGAMgASgFEhoK" + "EmNhY2hlX3JwY19yZXNwb25zZRgEIAEoCBIqCiJkaXNhYmxlX3Nlc3Npb25f" + "Y29ubmVjdGlvbl9zaGFyaW5nGAUgASgIEh8KF251bV9jaGFubmVsc19wZXJf" + "dGFyZ2V0GAYgASgFIjAKD1Nlc3Npb25NZXRhZGF0YRIMCgRuYW1lGAEgASgJ" + "Eg8KB3ZlcnNpb24YAiABKAMiuA4KC0NvbmZpZ1Byb3RvEj8KDGRldmljZV9j" + "b3VudBgBIAMoCzIpLnRlbnNvcmJvYXJkLkNvbmZpZ1Byb3RvLkRldmljZUNv" + "dW50RW50cnkSJAocaW50cmFfb3BfcGFyYWxsZWxpc21fdGhyZWFkcxgCIAEo" + "BRIkChxpbnRlcl9vcF9wYXJhbGxlbGlzbV90aHJlYWRzGAUgASgFEh8KF3Vz" + "ZV9wZXJfc2Vzc2lvbl90aHJlYWRzGAkgASgIEkgKHHNlc3Npb25faW50ZXJf" + "b3BfdGhyZWFkX3Bvb2wYDCADKAsyIi50ZW5zb3Jib2FyZC5UaHJlYWRQb29s" + "T3B0aW9uUHJvdG8SGAoQcGxhY2VtZW50X3BlcmlvZBgDIAEoBRIWCg5kZXZp" + "Y2VfZmlsdGVycxgEIAMoCRIsCgtncHVfb3B0aW9ucxgGIAEoCzIXLnRlbnNv" + "cmJvYXJkLkdQVU9wdGlvbnMSHAoUYWxsb3dfc29mdF9wbGFjZW1lbnQYByAB" + "KAgSHAoUbG9nX2RldmljZV9wbGFjZW1lbnQYCCABKAgSMAoNZ3JhcGhfb3B0" + "aW9ucxgKIAEoCzIZLnRlbnNvcmJvYXJkLkdyYXBoT3B0aW9ucxIfChdvcGVy" + "YXRpb25fdGltZW91dF9pbl9tcxgLIAEoAxIsCgtycGNfb3B0aW9ucxgNIAEo" + "CzIXLnRlbnNvcmJvYXJkLlJQQ09wdGlvbnMSLAoLY2x1c3Rlcl9kZWYYDiAB" + "KAsyFy50ZW5zb3Jib2FyZC5DbHVzdGVyRGVmEh0KFWlzb2xhdGVfc2Vzc2lv" + "bl9zdGF0ZRgPIAEoCBIoCiBzaGFyZV9jbHVzdGVyX2RldmljZXNfaW5fc2Vz" + "c2lvbhgRIAEoCBI7CgxleHBlcmltZW50YWwYECABKAsyJS50ZW5zb3Jib2Fy" + "ZC5Db25maWdQcm90by5FeHBlcmltZW50YWwaMgoQRGV2aWNlQ291bnRFbnRy" + "eRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAU6AjgBGqsICgxFeHBlcmlt" + "ZW50YWwSHwoXY29sbGVjdGl2ZV9ncm91cF9sZWFkZXIYASABKAkSFQoNZXhl" + "Y3V0b3JfdHlwZRgDIAEoCRIaChJyZWN2X2J1Zl9tYXhfY2h1bmsYBCABKAUS" + "GQoRdXNlX251bWFfYWZmaW5pdHkYBSABKAgSNQotY29sbGVjdGl2ZV9kZXRl" + "cm1pbmlzdGljX3NlcXVlbnRpYWxfZXhlY3V0aW9uGAYgASgIEhcKD2NvbGxl" + "Y3RpdmVfbmNjbBgHIAEoCBI2Ci5zaGFyZV9zZXNzaW9uX3N0YXRlX2luX2Ns" + "dXN0ZXJzcGVjX3Byb3BhZ2F0aW9uGAggASgIEh8KF2Rpc2FibGVfdGhyZWFk" + "X3NwaW5uaW5nGAkgASgIEigKIHNoYXJlX2NsdXN0ZXJfZGV2aWNlc19pbl9z" + "ZXNzaW9uGAogASgIEjYKEHNlc3Npb25fbWV0YWRhdGEYCyABKAsyHC50ZW5z" + "b3Jib2FyZC5TZXNzaW9uTWV0YWRhdGESIQoZb3B0aW1pemVfZm9yX3N0YXRp" + "Y19ncmFwaBgMIAEoCBIaChJlbmFibGVfbWxpcl9icmlkZ2UYDSABKAgSVAoT" + "bWxpcl9icmlkZ2Vfcm9sbG91dBgRIAEoDjI3LnRlbnNvcmJvYXJkLkNvbmZp" + "Z1Byb3RvLkV4cGVyaW1lbnRhbC5NbGlyQnJpZGdlUm9sbG91dBImCh5lbmFi" + "bGVfbWxpcl9ncmFwaF9vcHRpbWl6YXRpb24YECABKAgSJwofZGlzYWJsZV9v" + "dXRwdXRfcGFydGl0aW9uX2dyYXBocxgOIAEoCBIjCht4bGFfZnVzaW9uX2F1" + "dG90dW5lcl90aHJlc2gYDyABKAMSEAoIdXNlX3RmcnQYEiABKAgSJwofZGlz" + "YWJsZV9mdW5jdGlvbmFsX29wc19sb3dlcmluZxgVIAEoCBInCh94bGFfcHJl" + "ZmVyX3NpbmdsZV9ncmFwaF9jbHVzdGVyGBYgASgIEkMKE2Nvb3JkaW5hdGlv" + "bl9jb25maWcYFyABKAsyJi50ZW5zb3Jib2FyZC5Db29yZGluYXRpb25TZXJ2" + "aWNlQ29uZmlnItoBChFNbGlyQnJpZGdlUm9sbG91dBIjCh9NTElSX0JSSURH" + "RV9ST0xMT1VUX1VOU1BFQ0lGSUVEEAASHwobTUxJUl9CUklER0VfUk9MTE9V" + "VF9FTkFCTEVEEAESIAocTUxJUl9CUklER0VfUk9MTE9VVF9ESVNBQkxFRBAC" + "EikKJU1MSVJfQlJJREdFX1JPTExPVVRfU0FGRV9NT0RFX0VOQUJMRUQQAxIy" + "Ci5NTElSX0JSSURHRV9ST0xMT1VUX1NBRkVfTU9ERV9GQUxMQkFDS19FTkFC" + "TEVEEARKBAgCEANKBAgTEBRKBAgUEBUi5QQKClJ1bk9wdGlvbnMSNwoLdHJh" + "Y2VfbGV2ZWwYASABKA4yIi50ZW5zb3Jib2FyZC5SdW5PcHRpb25zLlRyYWNl" + "TGV2ZWwSFQoNdGltZW91dF9pbl9tcxgCIAEoAxIcChRpbnRlcl9vcF90aHJl" + "YWRfcG9vbBgDIAEoBRIfChdvdXRwdXRfcGFydGl0aW9uX2dyYXBocxgFIAEo" + "CBIwCg1kZWJ1Z19vcHRpb25zGAYgASgLMhkudGVuc29yYm9hcmQuRGVidWdP" + "cHRpb25zEioKInJlcG9ydF90ZW5zb3JfYWxsb2NhdGlvbnNfdXBvbl9vb20Y" + "ByABKAgSOgoMZXhwZXJpbWVudGFsGAggASgLMiQudGVuc29yYm9hcmQuUnVu" + "T3B0aW9ucy5FeHBlcmltZW50YWwa0wEKDEV4cGVyaW1lbnRhbBIcChRjb2xs" + "ZWN0aXZlX2dyYXBoX2tleRgBIAEoAxIcChR1c2VfcnVuX2hhbmRsZXJfcG9v" + "bBgCIAEoCBJcChhydW5faGFuZGxlcl9wb29sX29wdGlvbnMYAyABKAsyOi50" + "ZW5zb3Jib2FyZC5SdW5PcHRpb25zLkV4cGVyaW1lbnRhbC5SdW5IYW5kbGVy" + "UG9vbE9wdGlvbnMaKQoVUnVuSGFuZGxlclBvb2xPcHRpb25zEhAKCHByaW9y" + "aXR5GAEgASgDIlIKClRyYWNlTGV2ZWwSDAoITk9fVFJBQ0UQABISCg5TT0ZU" + "V0FSRV9UUkFDRRABEhIKDkhBUkRXQVJFX1RSQUNFEAISDgoKRlVMTF9UUkFD" + "RRADSgQIBBAFIo4DCgtSdW5NZXRhZGF0YRIqCgpzdGVwX3N0YXRzGAEgASgL" + "MhYudGVuc29yYm9hcmQuU3RlcFN0YXRzEi0KCmNvc3RfZ3JhcGgYAiABKAsy" + "GS50ZW5zb3Jib2FyZC5Db3N0R3JhcGhEZWYSLwoQcGFydGl0aW9uX2dyYXBo" + "cxgDIAMoCzIVLnRlbnNvcmJvYXJkLkdyYXBoRGVmEkAKD2Z1bmN0aW9uX2dy" + "YXBocxgEIAMoCzInLnRlbnNvcmJvYXJkLlJ1bk1ldGFkYXRhLkZ1bmN0aW9u" + "R3JhcGhzGrABCg5GdW5jdGlvbkdyYXBocxIvChBwYXJ0aXRpb25fZ3JhcGhz" + "GAEgAygLMhUudGVuc29yYm9hcmQuR3JhcGhEZWYSNQoWcHJlX29wdGltaXph" + "dGlvbl9ncmFwaBgCIAEoCzIVLnRlbnNvcmJvYXJkLkdyYXBoRGVmEjYKF3Bv" + "c3Rfb3B0aW1pemF0aW9uX2dyYXBoGAMgASgLMhUudGVuc29yYm9hcmQuR3Jh" + "cGhEZWYiOgoQVGVuc29yQ29ubmVjdGlvbhITCgtmcm9tX3RlbnNvchgBIAEo" + "CRIRCgl0b190ZW5zb3IYAiABKAkitAMKD0NhbGxhYmxlT3B0aW9ucxIMCgRm" + "ZWVkGAEgAygJEg0KBWZldGNoGAIgAygJEg4KBnRhcmdldBgDIAMoCRIsCgty" + "dW5fb3B0aW9ucxgEIAEoCzIXLnRlbnNvcmJvYXJkLlJ1bk9wdGlvbnMSOAoR" + "dGVuc29yX2Nvbm5lY3Rpb24YBSADKAsyHS50ZW5zb3Jib2FyZC5UZW5zb3JD" + "b25uZWN0aW9uEkMKDGZlZWRfZGV2aWNlcxgGIAMoCzItLnRlbnNvcmJvYXJk" + "LkNhbGxhYmxlT3B0aW9ucy5GZWVkRGV2aWNlc0VudHJ5EkUKDWZldGNoX2Rl" + "dmljZXMYByADKAsyLi50ZW5zb3Jib2FyZC5DYWxsYWJsZU9wdGlvbnMuRmV0" + "Y2hEZXZpY2VzRW50cnkSFwoPZmV0Y2hfc2tpcF9zeW5jGAggASgIGjIKEEZl" + "ZWREZXZpY2VzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4" + "ARozChFGZXRjaERldmljZXNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUY" + "AiABKAk6AjgBQoQBChhvcmcudGVuc29yZmxvdy5mcmFtZXdvcmtCDENvbmZp" + "Z1Byb3Rvc1ABWlVnaXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yZmxvdy90" + "ZW5zb3JmbG93L2dvL2NvcmUvcHJvdG9idWYvZm9yX2NvcmVfcHJvdG9zX2dv" + "X3Byb3Rv+AEBYgZwcm90bzM="), (FileDescriptor[])(object)new FileDescriptor[7] { CostGraphReflection.Descriptor, GraphReflection.Descriptor, StepStatsReflection.Descriptor, ClusterReflection.Descriptor, CoordinationConfigReflection.Descriptor, DebugReflection.Descriptor, RewriterConfigReflection.Descriptor }, new GeneratedClrTypeInfo((Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])(object)new GeneratedClrTypeInfo[11] { new GeneratedClrTypeInfo(typeof(GPUOptions), (MessageParser)(object)GPUOptions.Parser, new string[9] { "PerProcessGpuMemoryFraction", "AllowGrowth", "AllocatorType", "DeferredDeletionBytes", "VisibleDeviceList", "PollingActiveDelayUsecs", "PollingInactiveDelayMsecs", "ForceGpuCompatible", "Experimental" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])(object)new GeneratedClrTypeInfo[1] { new GeneratedClrTypeInfo(typeof(GPUOptions.Types.Experimental), (MessageParser)(object)GPUOptions.Types.Experimental.Parser, new string[11] { "VirtualDevices", "UseUnifiedMemory", "NumDevToDevCopyStreams", "CollectiveRingOrder", "TimestampedAllocator", "KernelTrackerMaxInterval", "KernelTrackerMaxBytes", "KernelTrackerMaxPending", "InternalFragmentationFraction", "UseCudaMallocAsync", "DisallowRetryOnAllocationFailure" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])(object)new GeneratedClrTypeInfo[1] { new GeneratedClrTypeInfo(typeof(GPUOptions.Types.Experimental.Types.VirtualDevices), (MessageParser)(object)GPUOptions.Types.Experimental.Types.VirtualDevices.Parser, new string[2] { "MemoryLimitMb", "Priority" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])null) }) }), new GeneratedClrTypeInfo(typeof(OptimizerOptions), (MessageParser)(object)OptimizerOptions.Parser, new string[7] { "DoCommonSubexpressionElimination", "DoConstantFolding", "MaxFoldedConstantInBytes", "DoFunctionInlining", "OptLevel", "GlobalJitLevel", "CpuGlobalJit" }, (string[])null, new Type[2] { typeof(OptimizerOptions.Types.Level), typeof(OptimizerOptions.Types.GlobalJitLevel) }, (Extension[])null, (GeneratedClrTypeInfo[])null), new GeneratedClrTypeInfo(typeof(GraphOptions), (MessageParser)(object)GraphOptions.Parser, new string[9] { "EnableRecvScheduling", "OptimizerOptions", "BuildCostModel", "BuildCostModelAfter", "InferShapes", "PlacePrunedGraph", "EnableBfloat16Sendrecv", "TimelineStep", "RewriteOptions" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])null), new GeneratedClrTypeInfo(typeof(ThreadPoolOptionProto), (MessageParser)(object)ThreadPoolOptionProto.Parser, new string[2] { "NumThreads", "GlobalName" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])null), new GeneratedClrTypeInfo(typeof(RPCOptions), (MessageParser)(object)RPCOptions.Parser, new string[6] { "UseRpcForInprocessMaster", "CompressionAlgorithm", "CompressionLevel", "CacheRpcResponse", "DisableSessionConnectionSharing", "NumChannelsPerTarget" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])null), new GeneratedClrTypeInfo(typeof(SessionMetadata), (MessageParser)(object)SessionMetadata.Parser, new string[2] { "Name", "Version" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])null), new GeneratedClrTypeInfo(typeof(ConfigProto), (MessageParser)(object)ConfigProto.Parser, new string[17] { "DeviceCount", "IntraOpParallelismThreads", "InterOpParallelismThreads", "UsePerSessionThreads", "SessionInterOpThreadPool", "PlacementPeriod", "DeviceFilters", "GpuOptions", "AllowSoftPlacement", "LogDevicePlacement", "GraphOptions", "OperationTimeoutInMs", "RpcOptions", "ClusterDef", "IsolateSessionState", "ShareClusterDevicesInSession", "Experimental" }, (string[])null, (Type[])null, (Extension[])null, (GeneratedClrTypeInfo[])(object)new GeneratedClrTypeInfo[2] { default(GeneratedClrTypeInfo), new GeneratedClrTypeInfo(typeof(ConfigProto.Types.Experimental), (MessageParser)(object)ConfigProto.Types.Experimental.Parser, new string[20] { "CollectiveGroupLeader", "ExecutorType", "RecvBufMaxChunk", "UseNumaAffinity", "CollectiveDeterministicSequentialExecution", "CollectiveNccl", "ShareSessionStateInClusterspecPropagation", "DisableThreadSpinning", "ShareClusterDevicesInSession", "SessionMetadata", "OptimizeForStaticGraph", "EnableMlirBridge", "MlirBridgeRollout", "EnableMlirGraphOptimization", "DisableOutputPartitionGraphs", "XlaFusionAutotunerThresh", "UseTfrt", "DisableFunctionalOpsLowering", "XlaPreferSingleGraphCluster", "CoordinationConfig" }, (string[])null, new Type[1] { typeof(ConfigProto.Types.Experimental.Types.MlirBridgeRollout) }, (Extension[])null, (GeneratedClrTypeInfo[])null) }), new GeneratedClrTypeInfo(typeof(RunOptions), (MessageParser)(object)RunOptions.Parser, new string[7] { "TraceLevel", "TimeoutInMs", "InterOpThreadPool", "OutputPartitionGraphs", "DebugOptions", "ReportTensorAllocationsUponOom", "Experimental" }, (string[])null, new Type[1] { typeof(RunOptions.Types.TraceLevel) }, (Extension[])null, (GeneratedClrTypeInfo[])(object)new GeneratedClrTypeInfo[1] { new GeneratedClrTypeInfo(typeof(RunOptions.Types.Experimental), (MessageParser)(object)RunOptions.Types.Experimental.Parser, new string[3] { "CollectiveGraphK
BepInEx/plugins/Broheim-SileroTTS/System.Web.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Web; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Web")] [assembly: AssemblyDescription("System.Web")] [assembly: AssemblyDefaultAlias("System.Web")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.0.0")] [assembly: TypeForwardedTo(typeof(HttpUtility))]
BepInEx/plugins/Broheim-SileroTTS/System.AppContext.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.AppContext")] [assembly: AssemblyDescription("System.AppContext")] [assembly: AssemblyDefaultAlias("System.AppContext")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(AppContext))]
BepInEx/plugins/Broheim-SileroTTS/System.ComponentModel.EventBasedAsync.dll
Decompiled 2 days agousing System; using System.ComponentModel; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.ComponentModel.EventBasedAsync")] [assembly: AssemblyDescription("System.ComponentModel.EventBasedAsync")] [assembly: AssemblyDefaultAlias("System.ComponentModel.EventBasedAsync")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(AsyncCompletedEventArgs))] [assembly: TypeForwardedTo(typeof(AsyncCompletedEventHandler))] [assembly: TypeForwardedTo(typeof(AsyncOperation))] [assembly: TypeForwardedTo(typeof(AsyncOperationManager))] [assembly: TypeForwardedTo(typeof(BackgroundWorker))] [assembly: TypeForwardedTo(typeof(DoWorkEventArgs))] [assembly: TypeForwardedTo(typeof(DoWorkEventHandler))] [assembly: TypeForwardedTo(typeof(ProgressChangedEventArgs))] [assembly: TypeForwardedTo(typeof(ProgressChangedEventHandler))] [assembly: TypeForwardedTo(typeof(RunWorkerCompletedEventArgs))] [assembly: TypeForwardedTo(typeof(RunWorkerCompletedEventHandler))]
BepInEx/plugins/Broheim-SileroTTS/System.Runtime.Handles.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Threading; using Microsoft.Win32.SafeHandles; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Runtime.Handles")] [assembly: AssemblyDescription("System.Runtime.Handles")] [assembly: AssemblyDefaultAlias("System.Runtime.Handles")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(SafeWaitHandle))] [assembly: TypeForwardedTo(typeof(HandleInheritability))] [assembly: TypeForwardedTo(typeof(CriticalHandle))] [assembly: TypeForwardedTo(typeof(SafeHandle))] [assembly: TypeForwardedTo(typeof(WaitHandleExtensions))]
BepInEx/plugins/Broheim-SileroTTS/System.Net.NetworkInformation.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Net.NetworkInformation; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Net.NetworkInformation")] [assembly: AssemblyDescription("System.Net.NetworkInformation")] [assembly: AssemblyDefaultAlias("System.Net.NetworkInformation")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(DuplicateAddressDetectionState))] [assembly: TypeForwardedTo(typeof(GatewayIPAddressInformation))] [assembly: TypeForwardedTo(typeof(GatewayIPAddressInformationCollection))] [assembly: TypeForwardedTo(typeof(IcmpV4Statistics))] [assembly: TypeForwardedTo(typeof(IcmpV6Statistics))] [assembly: TypeForwardedTo(typeof(IPAddressInformation))] [assembly: TypeForwardedTo(typeof(IPAddressInformationCollection))] [assembly: TypeForwardedTo(typeof(IPGlobalProperties))] [assembly: TypeForwardedTo(typeof(IPGlobalStatistics))] [assembly: TypeForwardedTo(typeof(IPInterfaceProperties))] [assembly: TypeForwardedTo(typeof(IPInterfaceStatistics))] [assembly: TypeForwardedTo(typeof(IPv4InterfaceProperties))] [assembly: TypeForwardedTo(typeof(IPv6InterfaceProperties))] [assembly: TypeForwardedTo(typeof(MulticastIPAddressInformation))] [assembly: TypeForwardedTo(typeof(MulticastIPAddressInformationCollection))] [assembly: TypeForwardedTo(typeof(NetBiosNodeType))] [assembly: TypeForwardedTo(typeof(NetworkAddressChangedEventHandler))] [assembly: TypeForwardedTo(typeof(NetworkChange))] [assembly: TypeForwardedTo(typeof(NetworkInformationException))] [assembly: TypeForwardedTo(typeof(NetworkInterface))] [assembly: TypeForwardedTo(typeof(NetworkInterfaceComponent))] [assembly: TypeForwardedTo(typeof(NetworkInterfaceType))] [assembly: TypeForwardedTo(typeof(OperationalStatus))] [assembly: TypeForwardedTo(typeof(PhysicalAddress))] [assembly: TypeForwardedTo(typeof(PrefixOrigin))] [assembly: TypeForwardedTo(typeof(ScopeLevel))] [assembly: TypeForwardedTo(typeof(SuffixOrigin))] [assembly: TypeForwardedTo(typeof(TcpConnectionInformation))] [assembly: TypeForwardedTo(typeof(TcpState))] [assembly: TypeForwardedTo(typeof(TcpStatistics))] [assembly: TypeForwardedTo(typeof(UdpStatistics))] [assembly: TypeForwardedTo(typeof(UnicastIPAddressInformation))] [assembly: TypeForwardedTo(typeof(UnicastIPAddressInformationCollection))]
BepInEx/plugins/Broheim-SileroTTS/System.Threading.Tasks.Parallel.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Threading.Tasks; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Threading.Tasks.Parallel")] [assembly: AssemblyDescription("System.Threading.Tasks.Parallel")] [assembly: AssemblyDefaultAlias("System.Threading.Tasks.Parallel")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(Parallel))] [assembly: TypeForwardedTo(typeof(ParallelLoopResult))] [assembly: TypeForwardedTo(typeof(ParallelLoopState))] [assembly: TypeForwardedTo(typeof(ParallelOptions))]
BepInEx/plugins/Broheim-SileroTTS/System.IO.Pipes.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.IO.Pipes; using System.Reflection; using System.Runtime.CompilerServices; using Microsoft.Win32.SafeHandles; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.IO.Pipes")] [assembly: AssemblyDescription("System.IO.Pipes")] [assembly: AssemblyDefaultAlias("System.IO.Pipes")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(SafePipeHandle))] [assembly: TypeForwardedTo(typeof(AnonymousPipeClientStream))] [assembly: TypeForwardedTo(typeof(AnonymousPipeServerStream))] [assembly: TypeForwardedTo(typeof(NamedPipeClientStream))] [assembly: TypeForwardedTo(typeof(NamedPipeServerStream))] [assembly: TypeForwardedTo(typeof(PipeDirection))] [assembly: TypeForwardedTo(typeof(PipeOptions))] [assembly: TypeForwardedTo(typeof(PipeStream))] [assembly: TypeForwardedTo(typeof(PipeTransmissionMode))]
BepInEx/plugins/Broheim-SileroTTS/System.IO.Compression.ZipFile.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.IO.Compression; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.IO.Compression.ZipFile")] [assembly: AssemblyDescription("System.IO.Compression.ZipFile")] [assembly: AssemblyDefaultAlias("System.IO.Compression.ZipFile")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.3.0")] [assembly: TypeForwardedTo(typeof(ZipFile))] [assembly: TypeForwardedTo(typeof(ZipFileExtensions))]
BepInEx/plugins/Broheim-SileroTTS/System.Text.Encoding.Extensions.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Text; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Text.Encoding.Extensions")] [assembly: AssemblyDescription("System.Text.Encoding.Extensions")] [assembly: AssemblyDefaultAlias("System.Text.Encoding.Extensions")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(ASCIIEncoding))] [assembly: TypeForwardedTo(typeof(UnicodeEncoding))] [assembly: TypeForwardedTo(typeof(UTF32Encoding))] [assembly: TypeForwardedTo(typeof(UTF7Encoding))] [assembly: TypeForwardedTo(typeof(UTF8Encoding))]
BepInEx/plugins/Broheim-SileroTTS/System.Collections.dll
Decompiled 2 days agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Collections")] [assembly: AssemblyDescription("System.Collections")] [assembly: AssemblyDefaultAlias("System.Collections")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(BitArray))] [assembly: TypeForwardedTo(typeof(Comparer<>))] [assembly: TypeForwardedTo(typeof(Dictionary<, >))] [assembly: TypeForwardedTo(typeof(EqualityComparer<>))] [assembly: TypeForwardedTo(typeof(HashSet<>))] [assembly: TypeForwardedTo(typeof(LinkedList<>))] [assembly: TypeForwardedTo(typeof(LinkedListNode<>))] [assembly: TypeForwardedTo(typeof(List<>))] [assembly: TypeForwardedTo(typeof(Queue<>))] [assembly: TypeForwardedTo(typeof(SortedDictionary<, >))] [assembly: TypeForwardedTo(typeof(SortedList<, >))] [assembly: TypeForwardedTo(typeof(SortedSet<>))] [assembly: TypeForwardedTo(typeof(Stack<>))] [assembly: TypeForwardedTo(typeof(StructuralComparisons))]
BepInEx/plugins/Broheim-SileroTTS/System.Reflection.Extensions.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Reflection.Extensions")] [assembly: AssemblyDescription("System.Reflection.Extensions")] [assembly: AssemblyDefaultAlias("System.Reflection.Extensions")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(CustomAttributeExtensions))] [assembly: TypeForwardedTo(typeof(InterfaceMapping))] [assembly: TypeForwardedTo(typeof(RuntimeReflectionExtensions))]
BepInEx/plugins/Broheim-SileroTTS/System.Console.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Console")] [assembly: AssemblyDescription("System.Console")] [assembly: AssemblyDefaultAlias("System.Console")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(Console))] [assembly: TypeForwardedTo(typeof(ConsoleCancelEventArgs))] [assembly: TypeForwardedTo(typeof(ConsoleCancelEventHandler))] [assembly: TypeForwardedTo(typeof(ConsoleColor))] [assembly: TypeForwardedTo(typeof(ConsoleKey))] [assembly: TypeForwardedTo(typeof(ConsoleKeyInfo))] [assembly: TypeForwardedTo(typeof(ConsoleModifiers))] [assembly: TypeForwardedTo(typeof(ConsoleSpecialKey))]
BepInEx/plugins/Broheim-SileroTTS/System.ComponentModel.Primitives.dll
Decompiled 2 days agousing System; using System.ComponentModel; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.ComponentModel.Primitives")] [assembly: AssemblyDescription("System.ComponentModel.Primitives")] [assembly: AssemblyDefaultAlias("System.ComponentModel.Primitives")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(BrowsableAttribute))] [assembly: TypeForwardedTo(typeof(CategoryAttribute))] [assembly: TypeForwardedTo(typeof(ComponentCollection))] [assembly: TypeForwardedTo(typeof(DescriptionAttribute))] [assembly: TypeForwardedTo(typeof(DesignerCategoryAttribute))] [assembly: TypeForwardedTo(typeof(DesignerSerializationVisibility))] [assembly: TypeForwardedTo(typeof(DesignerSerializationVisibilityAttribute))] [assembly: TypeForwardedTo(typeof(DesignOnlyAttribute))] [assembly: TypeForwardedTo(typeof(DisplayNameAttribute))] [assembly: TypeForwardedTo(typeof(EventHandlerList))] [assembly: TypeForwardedTo(typeof(IComponent))] [assembly: TypeForwardedTo(typeof(IContainer))] [assembly: TypeForwardedTo(typeof(ImmutableObjectAttribute))] [assembly: TypeForwardedTo(typeof(InitializationEventAttribute))] [assembly: TypeForwardedTo(typeof(ISite))] [assembly: TypeForwardedTo(typeof(LocalizableAttribute))] [assembly: TypeForwardedTo(typeof(MergablePropertyAttribute))] [assembly: TypeForwardedTo(typeof(NotifyParentPropertyAttribute))] [assembly: TypeForwardedTo(typeof(ParenthesizePropertyNameAttribute))] [assembly: TypeForwardedTo(typeof(ReadOnlyAttribute))] [assembly: TypeForwardedTo(typeof(RefreshProperties))] [assembly: TypeForwardedTo(typeof(RefreshPropertiesAttribute))]
BepInEx/plugins/Broheim-SileroTTS/System.Runtime.Serialization.Primitives.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Runtime.Serialization.Primitives")] [assembly: AssemblyDescription("System.Runtime.Serialization.Primitives")] [assembly: AssemblyDefaultAlias("System.Runtime.Serialization.Primitives")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.3.0")] [assembly: TypeForwardedTo(typeof(CollectionDataContractAttribute))] [assembly: TypeForwardedTo(typeof(ContractNamespaceAttribute))] [assembly: TypeForwardedTo(typeof(DataContractAttribute))] [assembly: TypeForwardedTo(typeof(DataMemberAttribute))] [assembly: TypeForwardedTo(typeof(EnumMemberAttribute))] [assembly: TypeForwardedTo(typeof(IgnoreDataMemberAttribute))] [assembly: TypeForwardedTo(typeof(InvalidDataContractException))] [assembly: TypeForwardedTo(typeof(ISerializationSurrogateProvider))] [assembly: TypeForwardedTo(typeof(KnownTypeAttribute))] [assembly: TypeForwardedTo(typeof(OnDeserializedAttribute))] [assembly: TypeForwardedTo(typeof(OnDeserializingAttribute))] [assembly: TypeForwardedTo(typeof(OnSerializedAttribute))] [assembly: TypeForwardedTo(typeof(OnSerializingAttribute))] [assembly: TypeForwardedTo(typeof(SerializationException))] [assembly: TypeForwardedTo(typeof(StreamingContext))]
BepInEx/plugins/Broheim-SileroTTS/System.Security.Cryptography.Algorithms.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Security.Cryptography; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Security.Cryptography.Algorithms")] [assembly: AssemblyDescription("System.Security.Cryptography.Algorithms")] [assembly: AssemblyDefaultAlias("System.Security.Cryptography.Algorithms")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.2.2.0")] [assembly: TypeForwardedTo(typeof(Aes))] [assembly: TypeForwardedTo(typeof(DeriveBytes))] [assembly: TypeForwardedTo(typeof(ECCurve))] [assembly: TypeForwardedTo(typeof(ECDsa))] [assembly: TypeForwardedTo(typeof(ECParameters))] [assembly: TypeForwardedTo(typeof(ECPoint))] [assembly: TypeForwardedTo(typeof(HMACMD5))] [assembly: TypeForwardedTo(typeof(HMACSHA1))] [assembly: TypeForwardedTo(typeof(HMACSHA256))] [assembly: TypeForwardedTo(typeof(HMACSHA384))] [assembly: TypeForwardedTo(typeof(HMACSHA512))] [assembly: TypeForwardedTo(typeof(IncrementalHash))] [assembly: TypeForwardedTo(typeof(MD5))] [assembly: TypeForwardedTo(typeof(RandomNumberGenerator))] [assembly: TypeForwardedTo(typeof(Rfc2898DeriveBytes))] [assembly: TypeForwardedTo(typeof(RSA))] [assembly: TypeForwardedTo(typeof(RSAEncryptionPadding))] [assembly: TypeForwardedTo(typeof(RSAEncryptionPaddingMode))] [assembly: TypeForwardedTo(typeof(RSAParameters))] [assembly: TypeForwardedTo(typeof(RSASignaturePadding))] [assembly: TypeForwardedTo(typeof(RSASignaturePaddingMode))] [assembly: TypeForwardedTo(typeof(SHA1))] [assembly: TypeForwardedTo(typeof(SHA256))] [assembly: TypeForwardedTo(typeof(SHA384))] [assembly: TypeForwardedTo(typeof(SHA512))] [assembly: TypeForwardedTo(typeof(TripleDES))]
BepInEx/plugins/Broheim-SileroTTS/System.Runtime.InteropServices.RuntimeInformation.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Runtime.InteropServices.RuntimeInformation")] [assembly: AssemblyDescription("System.Runtime.InteropServices.RuntimeInformation")] [assembly: AssemblyDefaultAlias("System.Runtime.InteropServices.RuntimeInformation")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(Architecture))] [assembly: TypeForwardedTo(typeof(OSPlatform))] [assembly: TypeForwardedTo(typeof(RuntimeInformation))]
BepInEx/plugins/Broheim-SileroTTS/System.ServiceModel.Web.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization.Json; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.ServiceModel.Web")] [assembly: AssemblyDescription("System.ServiceModel.Web")] [assembly: AssemblyDefaultAlias("System.ServiceModel.Web")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.0.0")] [assembly: TypeForwardedTo(typeof(DataContractJsonSerializer))] [assembly: TypeForwardedTo(typeof(IXmlJsonReaderInitializer))] [assembly: TypeForwardedTo(typeof(IXmlJsonWriterInitializer))] [assembly: TypeForwardedTo(typeof(JsonReaderWriterFactory))]
BepInEx/plugins/Broheim-SileroTTS/System.Diagnostics.FileVersionInfo.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Diagnostics.FileVersionInfo")] [assembly: AssemblyDescription("System.Diagnostics.FileVersionInfo")] [assembly: AssemblyDefaultAlias("System.Diagnostics.FileVersionInfo")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(FileVersionInfo))]
BepInEx/plugins/Broheim-SileroTTS/System.Runtime.Serialization.Json.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Runtime.Serialization.Json; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Runtime.Serialization.Json")] [assembly: AssemblyDescription("System.Runtime.Serialization.Json")] [assembly: AssemblyDefaultAlias("System.Runtime.Serialization.Json")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(DateTimeFormat))] [assembly: TypeForwardedTo(typeof(EmitTypeInformation))] [assembly: TypeForwardedTo(typeof(DataContractJsonSerializer))] [assembly: TypeForwardedTo(typeof(DataContractJsonSerializerSettings))]
BepInEx/plugins/Broheim-SileroTTS/System.Net.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Net; using System.Net.NetworkInformation; using System.Net.Sockets; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Net")] [assembly: AssemblyDescription("System.Net")] [assembly: AssemblyDefaultAlias("System.Net")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.0.0")] [assembly: TypeForwardedTo(typeof(Cookie))] [assembly: TypeForwardedTo(typeof(CookieCollection))] [assembly: TypeForwardedTo(typeof(CookieContainer))] [assembly: TypeForwardedTo(typeof(CookieException))] [assembly: TypeForwardedTo(typeof(DnsEndPoint))] [assembly: TypeForwardedTo(typeof(DownloadProgressChangedEventArgs))] [assembly: TypeForwardedTo(typeof(DownloadProgressChangedEventHandler))] [assembly: TypeForwardedTo(typeof(DownloadStringCompletedEventArgs))] [assembly: TypeForwardedTo(typeof(DownloadStringCompletedEventHandler))] [assembly: TypeForwardedTo(typeof(EndPoint))] [assembly: TypeForwardedTo(typeof(HttpRequestHeader))] [assembly: TypeForwardedTo(typeof(HttpStatusCode))] [assembly: TypeForwardedTo(typeof(HttpWebRequest))] [assembly: TypeForwardedTo(typeof(HttpWebResponse))] [assembly: TypeForwardedTo(typeof(ICredentials))] [assembly: TypeForwardedTo(typeof(IPAddress))] [assembly: TypeForwardedTo(typeof(IPEndPoint))] [assembly: TypeForwardedTo(typeof(IWebRequestCreate))] [assembly: TypeForwardedTo(typeof(NetworkCredential))] [assembly: TypeForwardedTo(typeof(NetworkAddressChangedEventHandler))] [assembly: TypeForwardedTo(typeof(NetworkChange))] [assembly: TypeForwardedTo(typeof(NetworkInterface))] [assembly: TypeForwardedTo(typeof(OpenReadCompletedEventArgs))] [assembly: TypeForwardedTo(typeof(OpenReadCompletedEventHandler))] [assembly: TypeForwardedTo(typeof(OpenWriteCompletedEventArgs))] [assembly: TypeForwardedTo(typeof(OpenWriteCompletedEventHandler))] [assembly: TypeForwardedTo(typeof(ProtocolViolationException))] [assembly: TypeForwardedTo(typeof(SocketAddress))] [assembly: TypeForwardedTo(typeof(AddressFamily))] [assembly: TypeForwardedTo(typeof(ProtocolType))] [assembly: TypeForwardedTo(typeof(Socket))] [assembly: TypeForwardedTo(typeof(SocketAsyncEventArgs))] [assembly: TypeForwardedTo(typeof(SocketAsyncOperation))] [assembly: TypeForwardedTo(typeof(SocketError))] [assembly: TypeForwardedTo(typeof(SocketException))] [assembly: TypeForwardedTo(typeof(SocketShutdown))] [assembly: TypeForwardedTo(typeof(SocketType))] [assembly: TypeForwardedTo(typeof(UploadProgressChangedEventArgs))] [assembly: TypeForwardedTo(typeof(UploadProgressChangedEventHandler))] [assembly: TypeForwardedTo(typeof(UploadStringCompletedEventArgs))] [assembly: TypeForwardedTo(typeof(UploadStringCompletedEventHandler))] [assembly: TypeForwardedTo(typeof(WebClient))] [assembly: TypeForwardedTo(typeof(WebException))] [assembly: TypeForwardedTo(typeof(WebExceptionStatus))] [assembly: TypeForwardedTo(typeof(WebHeaderCollection))] [assembly: TypeForwardedTo(typeof(WebRequest))] [assembly: TypeForwardedTo(typeof(WebResponse))]
BepInEx/plugins/Broheim-SileroTTS/System.Reflection.Primitives.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Reflection.Primitives")] [assembly: AssemblyDescription("System.Reflection.Primitives")] [assembly: AssemblyDefaultAlias("System.Reflection.Primitives")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(CallingConventions))] [assembly: TypeForwardedTo(typeof(FlowControl))] [assembly: TypeForwardedTo(typeof(OpCode))] [assembly: TypeForwardedTo(typeof(OpCodes))] [assembly: TypeForwardedTo(typeof(OpCodeType))] [assembly: TypeForwardedTo(typeof(OperandType))] [assembly: TypeForwardedTo(typeof(PackingSize))] [assembly: TypeForwardedTo(typeof(StackBehaviour))] [assembly: TypeForwardedTo(typeof(EventAttributes))] [assembly: TypeForwardedTo(typeof(FieldAttributes))] [assembly: TypeForwardedTo(typeof(GenericParameterAttributes))] [assembly: TypeForwardedTo(typeof(MethodAttributes))] [assembly: TypeForwardedTo(typeof(MethodImplAttributes))] [assembly: TypeForwardedTo(typeof(ParameterAttributes))] [assembly: TypeForwardedTo(typeof(PropertyAttributes))] [assembly: TypeForwardedTo(typeof(TypeAttributes))]
BepInEx/plugins/Broheim-SileroTTS/System.Diagnostics.TraceSource.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Diagnostics.TraceSource")] [assembly: AssemblyDescription("System.Diagnostics.TraceSource")] [assembly: AssemblyDefaultAlias("System.Diagnostics.TraceSource")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(BooleanSwitch))] [assembly: TypeForwardedTo(typeof(DefaultTraceListener))] [assembly: TypeForwardedTo(typeof(EventTypeFilter))] [assembly: TypeForwardedTo(typeof(SourceFilter))] [assembly: TypeForwardedTo(typeof(SourceLevels))] [assembly: TypeForwardedTo(typeof(SourceSwitch))] [assembly: TypeForwardedTo(typeof(Switch))] [assembly: TypeForwardedTo(typeof(Trace))] [assembly: TypeForwardedTo(typeof(TraceEventCache))] [assembly: TypeForwardedTo(typeof(TraceEventType))] [assembly: TypeForwardedTo(typeof(TraceFilter))] [assembly: TypeForwardedTo(typeof(TraceLevel))] [assembly: TypeForwardedTo(typeof(TraceListener))] [assembly: TypeForwardedTo(typeof(TraceListenerCollection))] [assembly: TypeForwardedTo(typeof(TraceOptions))] [assembly: TypeForwardedTo(typeof(TraceSource))] [assembly: TypeForwardedTo(typeof(TraceSwitch))]
BepInEx/plugins/Broheim-SileroTTS/System.Security.SecureString.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Security; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Security.SecureString")] [assembly: AssemblyDescription("System.Security.SecureString")] [assembly: AssemblyDefaultAlias("System.Security.SecureString")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(SecureString))] [assembly: TypeForwardedTo(typeof(SecureStringMarshal))]
BepInEx/plugins/Broheim-SileroTTS/System.Net.WebSockets.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Net.WebSockets; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Net.WebSockets")] [assembly: AssemblyDescription("System.Net.WebSockets")] [assembly: AssemblyDefaultAlias("System.Net.WebSockets")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(WebSocket))] [assembly: TypeForwardedTo(typeof(WebSocketCloseStatus))] [assembly: TypeForwardedTo(typeof(WebSocketError))] [assembly: TypeForwardedTo(typeof(WebSocketException))] [assembly: TypeForwardedTo(typeof(WebSocketMessageType))] [assembly: TypeForwardedTo(typeof(WebSocketReceiveResult))] [assembly: TypeForwardedTo(typeof(WebSocketState))]
BepInEx/plugins/Broheim-SileroTTS/System.Threading.Timer.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Threading.Timer")] [assembly: AssemblyDescription("System.Threading.Timer")] [assembly: AssemblyDefaultAlias("System.Threading.Timer")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(Timer))] [assembly: TypeForwardedTo(typeof(TimerCallback))]
BepInEx/plugins/Broheim-SileroTTS/System.IO.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.IO")] [assembly: AssemblyDescription("System.IO")] [assembly: AssemblyDefaultAlias("System.IO")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(BinaryReader))] [assembly: TypeForwardedTo(typeof(BinaryWriter))] [assembly: TypeForwardedTo(typeof(BufferedStream))] [assembly: TypeForwardedTo(typeof(EndOfStreamException))] [assembly: TypeForwardedTo(typeof(FileNotFoundException))] [assembly: TypeForwardedTo(typeof(InvalidDataException))] [assembly: TypeForwardedTo(typeof(IOException))] [assembly: TypeForwardedTo(typeof(MemoryStream))] [assembly: TypeForwardedTo(typeof(SeekOrigin))] [assembly: TypeForwardedTo(typeof(Stream))] [assembly: TypeForwardedTo(typeof(StreamReader))] [assembly: TypeForwardedTo(typeof(StreamWriter))] [assembly: TypeForwardedTo(typeof(StringReader))] [assembly: TypeForwardedTo(typeof(StringWriter))] [assembly: TypeForwardedTo(typeof(TextReader))] [assembly: TypeForwardedTo(typeof(TextWriter))]
BepInEx/plugins/Broheim-SileroTTS/SkiaSharp.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Buffers; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Threading; using Microsoft.CodeAnalysis; using SkiaSharp.Internals; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("SkiaSharp")] [assembly: AssemblyDescription("SkiaSharp is a cross-platform 2D graphics API for .NET platforms that can be used across mobile, server and desktop models to render images.")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("SkiaSharp")] [assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] [assembly: NeutralResourcesLanguage("en")] [assembly: AssemblyConfiguration("Release")] [assembly: InternalsVisibleTo("SkiaSharp.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")] [assembly: InternalsVisibleTo("SkiaSharp.Benchmarks, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")] [assembly: InternalsVisibleTo("SkiaSharp.HarfBuzz, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")] [assembly: InternalsVisibleTo("SkiaSharp.SceneGraph, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")] [assembly: InternalsVisibleTo("SkiaSharp.Skottie, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")] [assembly: AssemblyMetadata("IsTrimmable", "True")] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: AssemblyFileVersion("2.88.6.0")] [assembly: AssemblyInformationalVersion("2.88.6.0-e2c5c86249621857107c779af0f79b4d06613766")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.88.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] internal sealed class IsReadOnlyAttribute : Attribute { } [CompilerGenerated] [Embedded] internal sealed class IsUnmanagedAttribute : Attribute { } [CompilerGenerated] [Embedded] internal sealed class IsByRefLikeAttribute : Attribute { } } internal class VersionConstants { public const string AssemblyVersion = "2.88.0.0"; public const string AssemblyFileVersion = "2.88.6.0"; public const string AssemblyInformationalVersion = "2.88.6.0-e2c5c86249621857107c779af0f79b4d06613766"; public const string GitSha = "-e2c5c86249621857107c779af0f79b4d06613766"; public const int Milestone = 88; public const int Increment = 1; } namespace System.Diagnostics.CodeAnalysis { [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)] internal sealed class AllowNullAttribute : Attribute { } [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)] internal sealed class DisallowNullAttribute : Attribute { } [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, Inherited = false)] internal sealed class MaybeNullAttribute : Attribute { } [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, Inherited = false)] internal sealed class NotNullAttribute : Attribute { } [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] internal sealed class MaybeNullWhenAttribute : Attribute { public bool ReturnValue { get; } public MaybeNullWhenAttribute(bool returnValue) { ReturnValue = returnValue; } } [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] internal sealed class NotNullWhenAttribute : Attribute { public bool ReturnValue { get; } public NotNullWhenAttribute(bool returnValue) { ReturnValue = returnValue; } } [AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)] internal sealed class NotNullIfNotNullAttribute : Attribute { public string ParameterName { get; } public NotNullIfNotNullAttribute(string parameterName) { ParameterName = parameterName; } } [AttributeUsage(AttributeTargets.Method, Inherited = false)] internal sealed class DoesNotReturnAttribute : Attribute { } [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] internal sealed class DoesNotReturnIfAttribute : Attribute { public bool ParameterValue { get; } public DoesNotReturnIfAttribute(bool parameterValue) { ParameterValue = parameterValue; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] internal sealed class MemberNotNullAttribute : Attribute { public string[] Members { get; } public MemberNotNullAttribute(string member) { Members = new string[1] { member }; } public MemberNotNullAttribute(params string[] members) { Members = members; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] internal sealed class MemberNotNullWhenAttribute : Attribute { public bool ReturnValue { get; } public string[] Members { get; } public MemberNotNullWhenAttribute(bool returnValue, string member) { ReturnValue = returnValue; Members = new string[1] { member }; } public MemberNotNullWhenAttribute(bool returnValue, params string[] members) { ReturnValue = returnValue; Members = members; } } } namespace SkiaSharp { internal delegate Delegate GetMultiDelegateDelegate(Type index); internal delegate object UserDataDelegate(); internal static class DelegateProxies { public unsafe static readonly SKBitmapReleaseProxyDelegate SKBitmapReleaseDelegateProxy = SKBitmapReleaseDelegateProxyImplementation; public unsafe static readonly SKDataReleaseProxyDelegate SKDataReleaseDelegateProxy = SKDataReleaseDelegateProxyImplementation; public unsafe static readonly SKImageRasterReleaseProxyDelegate SKImageRasterReleaseDelegateProxy = SKImageRasterReleaseDelegateProxyImplementation; public unsafe static readonly SKImageRasterReleaseProxyDelegate SKImageRasterReleaseDelegateProxyForCoTaskMem = SKImageRasterReleaseDelegateProxyImplementationForCoTaskMem; public unsafe static readonly SKImageTextureReleaseProxyDelegate SKImageTextureReleaseDelegateProxy = SKImageTextureReleaseDelegateProxyImplementation; public unsafe static readonly SKSurfaceRasterReleaseProxyDelegate SKSurfaceReleaseDelegateProxy = SKSurfaceReleaseDelegateProxyImplementation; public unsafe static readonly GRGlGetProcProxyDelegate GRGlGetProcDelegateProxy = GRGlGetProcDelegateProxyImplementation; public unsafe static readonly GRVkGetProcProxyDelegate GRVkGetProcDelegateProxy = GRVkGetProcDelegateProxyImplementation; public unsafe static readonly SKGlyphPathProxyDelegate SKGlyphPathDelegateProxy = SKGlyphPathDelegateProxyImplementation; [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T Create<T>(object managedDel, T nativeDel, out GCHandle gch, out IntPtr contextPtr) { if (managedDel == null) { gch = default(GCHandle); contextPtr = IntPtr.Zero; return default(T); } gch = GCHandle.Alloc(managedDel); contextPtr = GCHandle.ToIntPtr(gch); return nativeDel; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Create(object managedDel, out GCHandle gch, out IntPtr contextPtr) { if (managedDel == null) { gch = default(GCHandle); contextPtr = IntPtr.Zero; } else { gch = GCHandle.Alloc(managedDel); contextPtr = GCHandle.ToIntPtr(gch); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T Get<T>(IntPtr contextPtr, out GCHandle gch) { if (contextPtr == IntPtr.Zero) { gch = default(GCHandle); return default(T); } gch = GCHandle.FromIntPtr(contextPtr); return (T)gch.Target; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static IntPtr CreateUserData(object userData, bool makeWeak = false) { userData = (makeWeak ? new WeakReference(userData) : userData); UserDataDelegate managedDel = () => userData; Create(managedDel, out var _, out var contextPtr); return contextPtr; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T GetUserData<T>(IntPtr contextPtr, out GCHandle gch) { UserDataDelegate userDataDelegate = Get<UserDataDelegate>(contextPtr, out gch); object obj = userDataDelegate(); if (!(obj is WeakReference weakReference)) { return (T)obj; } return (T)weakReference.Target; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static IntPtr CreateMulti<T1, T2>(T1 wrappedDelegate1, T2 wrappedDelegate2) where T1 : Delegate where T2 : Delegate { GetMultiDelegateDelegate managedDel = delegate(Type type) { if (type == typeof(T1)) { return wrappedDelegate1; } if (type == typeof(T2)) { return wrappedDelegate2; } throw new ArgumentOutOfRangeException("type"); }; Create(managedDel, out var _, out var contextPtr); return contextPtr; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static IntPtr CreateMulti<T1, T2, T3>(T1 wrappedDelegate1, T2 wrappedDelegate2, T3 wrappedDelegate3) where T1 : Delegate where T2 : Delegate where T3 : Delegate { GetMultiDelegateDelegate managedDel = delegate(Type type) { if (type == typeof(T1)) { return wrappedDelegate1; } if (type == typeof(T2)) { return wrappedDelegate2; } if (type == typeof(T3)) { return wrappedDelegate3; } throw new ArgumentOutOfRangeException("type"); }; Create(managedDel, out var _, out var contextPtr); return contextPtr; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T GetMulti<T>(IntPtr contextPtr, out GCHandle gch) where T : Delegate { GetMultiDelegateDelegate getMultiDelegateDelegate = Get<GetMultiDelegateDelegate>(contextPtr, out gch); return (T)getMultiDelegateDelegate(typeof(T)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void GetMulti<T1, T2>(IntPtr contextPtr, out T1 wrappedDelegate1, out T2 wrappedDelegate2, out GCHandle gch) where T1 : Delegate where T2 : Delegate { GetMultiDelegateDelegate getMultiDelegateDelegate = Get<GetMultiDelegateDelegate>(contextPtr, out gch); wrappedDelegate1 = (T1)getMultiDelegateDelegate(typeof(T1)); wrappedDelegate2 = (T2)getMultiDelegateDelegate(typeof(T2)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void GetMulti<T1, T2, T3>(IntPtr contextPtr, out T1 wrappedDelegate1, out T2 wrappedDelegate2, out T3 wrappedDelegate3, out GCHandle gch) where T1 : Delegate where T2 : Delegate where T3 : Delegate { GetMultiDelegateDelegate getMultiDelegateDelegate = Get<GetMultiDelegateDelegate>(contextPtr, out gch); wrappedDelegate1 = (T1)getMultiDelegateDelegate(typeof(T1)); wrappedDelegate2 = (T2)getMultiDelegateDelegate(typeof(T2)); wrappedDelegate3 = (T3)getMultiDelegateDelegate(typeof(T3)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static IntPtr CreateMultiUserData<T>(T wrappedDelegate, object userData, bool makeWeak = false) where T : Delegate { userData = (makeWeak ? new WeakReference(userData) : userData); UserDataDelegate userDataDelegate = () => userData; GetMultiDelegateDelegate managedDel = delegate(Type type) { if (type == typeof(T)) { return wrappedDelegate; } if (type == typeof(UserDataDelegate)) { return userDataDelegate; } throw new ArgumentOutOfRangeException("type"); }; Create(managedDel, out var _, out var contextPtr); return contextPtr; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static IntPtr CreateMultiUserData<T1, T2>(T1 wrappedDelegate1, T2 wrappedDelegate2, object userData, bool makeWeak = false) where T1 : Delegate where T2 : Delegate { userData = (makeWeak ? new WeakReference(userData) : userData); UserDataDelegate userDataDelegate = () => userData; GetMultiDelegateDelegate managedDel = delegate(Type type) { if (type == typeof(T1)) { return wrappedDelegate1; } if (type == typeof(T2)) { return wrappedDelegate2; } if (type == typeof(UserDataDelegate)) { return userDataDelegate; } throw new ArgumentOutOfRangeException("type"); }; Create(managedDel, out var _, out var contextPtr); return contextPtr; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static IntPtr CreateMultiUserData<T1, T2, T3>(T1 wrappedDelegate1, T2 wrappedDelegate2, T3 wrappedDelegate3, object userData, bool makeWeak = false) where T1 : Delegate where T2 : Delegate where T3 : Delegate { userData = (makeWeak ? new WeakReference(userData) : userData); UserDataDelegate userDataDelegate = () => userData; GetMultiDelegateDelegate managedDel = delegate(Type type) { if (type == typeof(T1)) { return wrappedDelegate1; } if (type == typeof(T2)) { return wrappedDelegate2; } if (type == typeof(T3)) { return wrappedDelegate3; } if (type == typeof(UserDataDelegate)) { return userDataDelegate; } throw new ArgumentOutOfRangeException("type"); }; Create(managedDel, out var _, out var contextPtr); return contextPtr; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static TUserData GetMultiUserData<TUserData>(IntPtr contextPtr, out GCHandle gch) { GetMultiDelegateDelegate multi = Get<GetMultiDelegateDelegate>(contextPtr, out gch); return GetUserData<TUserData>(multi); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void GetMultiUserData<T, TUserData>(IntPtr contextPtr, out T wrappedDelegate, out TUserData userData, out GCHandle gch) where T : Delegate { GetMultiDelegateDelegate getMultiDelegateDelegate = Get<GetMultiDelegateDelegate>(contextPtr, out gch); wrappedDelegate = (T)getMultiDelegateDelegate(typeof(T)); userData = GetUserData<TUserData>(getMultiDelegateDelegate); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void GetMultiUserData<T1, T2, TUserData>(IntPtr contextPtr, out T1 wrappedDelegate1, out T2 wrappedDelegate2, out TUserData userData, out GCHandle gch) where T1 : Delegate where T2 : Delegate { GetMultiDelegateDelegate getMultiDelegateDelegate = Get<GetMultiDelegateDelegate>(contextPtr, out gch); wrappedDelegate1 = (T1)getMultiDelegateDelegate(typeof(T1)); wrappedDelegate2 = (T2)getMultiDelegateDelegate(typeof(T2)); userData = GetUserData<TUserData>(getMultiDelegateDelegate); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void GetMultiUserData<T1, T2, T3, TUserData>(IntPtr contextPtr, out T1 wrappedDelegate1, out T2 wrappedDelegate2, out T3 wrappedDelegate3, out TUserData userData, out GCHandle gch) where T1 : Delegate where T2 : Delegate where T3 : Delegate { GetMultiDelegateDelegate getMultiDelegateDelegate = Get<GetMultiDelegateDelegate>(contextPtr, out gch); wrappedDelegate1 = (T1)getMultiDelegateDelegate(typeof(T1)); wrappedDelegate2 = (T2)getMultiDelegateDelegate(typeof(T2)); wrappedDelegate3 = (T3)getMultiDelegateDelegate(typeof(T3)); userData = GetUserData<TUserData>(getMultiDelegateDelegate); } [MethodImpl(MethodImplOptions.AggressiveInlining)] private static TUserData GetUserData<TUserData>(GetMultiDelegateDelegate multi) { UserDataDelegate userDataDelegate = (UserDataDelegate)multi(typeof(UserDataDelegate)); object obj = userDataDelegate(); if (!(obj is WeakReference weakReference)) { return (TUserData)obj; } return (TUserData)weakReference.Target; } [MonoPInvokeCallback(typeof(SKBitmapReleaseProxyDelegate))] private unsafe static void SKBitmapReleaseDelegateProxyImplementation(void* address, void* context) { GCHandle gch; SKBitmapReleaseDelegate sKBitmapReleaseDelegate = Get<SKBitmapReleaseDelegate>((IntPtr)context, out gch); try { sKBitmapReleaseDelegate((IntPtr)address, null); } finally { gch.Free(); } } [MonoPInvokeCallback(typeof(SKDataReleaseProxyDelegate))] private unsafe static void SKDataReleaseDelegateProxyImplementation(void* address, void* context) { GCHandle gch; SKDataReleaseDelegate sKDataReleaseDelegate = Get<SKDataReleaseDelegate>((IntPtr)context, out gch); try { sKDataReleaseDelegate((IntPtr)address, null); } finally { gch.Free(); } } [MonoPInvokeCallback(typeof(SKImageRasterReleaseProxyDelegate))] private unsafe static void SKImageRasterReleaseDelegateProxyImplementationForCoTaskMem(void* pixels, void* context) { Marshal.FreeCoTaskMem((IntPtr)pixels); } [MonoPInvokeCallback(typeof(SKImageRasterReleaseProxyDelegate))] private unsafe static void SKImageRasterReleaseDelegateProxyImplementation(void* pixels, void* context) { GCHandle gch; SKImageRasterReleaseDelegate sKImageRasterReleaseDelegate = Get<SKImageRasterReleaseDelegate>((IntPtr)context, out gch); try { sKImageRasterReleaseDelegate((IntPtr)pixels, null); } finally { gch.Free(); } } [MonoPInvokeCallback(typeof(SKImageTextureReleaseProxyDelegate))] private unsafe static void SKImageTextureReleaseDelegateProxyImplementation(void* context) { GCHandle gch; SKImageTextureReleaseDelegate sKImageTextureReleaseDelegate = Get<SKImageTextureReleaseDelegate>((IntPtr)context, out gch); try { sKImageTextureReleaseDelegate(null); } finally { gch.Free(); } } [MonoPInvokeCallback(typeof(SKSurfaceRasterReleaseProxyDelegate))] private unsafe static void SKSurfaceReleaseDelegateProxyImplementation(void* address, void* context) { GCHandle gch; SKSurfaceReleaseDelegate sKSurfaceReleaseDelegate = Get<SKSurfaceReleaseDelegate>((IntPtr)context, out gch); try { sKSurfaceReleaseDelegate((IntPtr)address, null); } finally { gch.Free(); } } [MonoPInvokeCallback(typeof(GRGlGetProcProxyDelegate))] private unsafe static IntPtr GRGlGetProcDelegateProxyImplementation(void* context, void* name) { GCHandle gch; GRGlGetProcedureAddressDelegate gRGlGetProcedureAddressDelegate = Get<GRGlGetProcedureAddressDelegate>((IntPtr)context, out gch); return gRGlGetProcedureAddressDelegate(Marshal.PtrToStringAnsi((IntPtr)name)); } [MonoPInvokeCallback(typeof(GRVkGetProcProxyDelegate))] private unsafe static IntPtr GRVkGetProcDelegateProxyImplementation(void* context, void* name, IntPtr instance, IntPtr device) { GCHandle gch; GRVkGetProcedureAddressDelegate gRVkGetProcedureAddressDelegate = Get<GRVkGetProcedureAddressDelegate>((IntPtr)context, out gch); return gRVkGetProcedureAddressDelegate(Marshal.PtrToStringAnsi((IntPtr)name), instance, device); } [MonoPInvokeCallback(typeof(SKGlyphPathProxyDelegate))] private unsafe static void SKGlyphPathDelegateProxyImplementation(IntPtr pathOrNull, SKMatrix* matrix, void* context) { GCHandle gch; SKGlyphPathDelegate sKGlyphPathDelegate = Get<SKGlyphPathDelegate>((IntPtr)context, out gch); SKPath path = SKPath.GetObject(pathOrNull, owns: false); sKGlyphPathDelegate(path, *matrix); } } [AttributeUsage(AttributeTargets.Method)] internal sealed class MonoPInvokeCallbackAttribute : Attribute { public Type Type { get; private set; } public MonoPInvokeCallbackAttribute(Type type) { Type = type; } } internal struct HashCode { private static readonly uint s_seed = GenerateGlobalSeed(); private const uint Prime1 = 2654435761u; private const uint Prime2 = 2246822519u; private const uint Prime3 = 3266489917u; private const uint Prime4 = 668265263u; private const uint Prime5 = 374761393u; private uint _v1; private uint _v2; private uint _v3; private uint _v4; private uint _queue1; private uint _queue2; private uint _queue3; private uint _length; private static uint GenerateGlobalSeed() { Random random = new Random(); return (uint)random.Next(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] private static void Initialize(out uint v1, out uint v2, out uint v3, out uint v4) { v1 = (uint)((int)s_seed + -1640531535 + -2048144777); v2 = s_seed + 2246822519u; v3 = s_seed; v4 = s_seed - 2654435761u; } [MethodImpl(MethodImplOptions.AggressiveInlining)] private static uint Round(uint hash, uint input) { return RotateLeft(hash + (uint)((int)input * -2048144777), 13) * 2654435761u; } [MethodImpl(MethodImplOptions.AggressiveInlining)] private static uint QueueRound(uint hash, uint queuedValue) { return RotateLeft(hash + (uint)((int)queuedValue * -1028477379), 17) * 668265263; } [MethodImpl(MethodImplOptions.AggressiveInlining)] private static uint MixState(uint v1, uint v2, uint v3, uint v4) { return RotateLeft(v1, 1) + RotateLeft(v2, 7) + RotateLeft(v3, 12) + RotateLeft(v4, 18); } [MethodImpl(MethodImplOptions.AggressiveInlining)] private static uint RotateLeft(uint value, int offset) { return (value << offset) | (value >> 32 - offset); } private static uint MixEmptyState() { return s_seed + 374761393; } [MethodImpl(MethodImplOptions.AggressiveInlining)] private static uint MixFinal(uint hash) { hash ^= hash >> 15; hash *= 2246822519u; hash ^= hash >> 13; hash *= 3266489917u; hash ^= hash >> 16; return hash; } public unsafe void Add(void* value) { Add((value != null) ? ((IntPtr)value).GetHashCode() : 0); } public void Add<T>(T value) { Add(value?.GetHashCode() ?? 0); } private void Add(int value) { uint num = _length++; switch (num % 4) { case 0u: _queue1 = (uint)value; return; case 1u: _queue2 = (uint)value; return; case 2u: _queue3 = (uint)value; return; } if (num == 3) { Initialize(out _v1, out _v2, out _v3, out _v4); } _v1 = Round(_v1, _queue1); _v2 = Round(_v2, _queue2); _v3 = Round(_v3, _queue3); _v4 = Round(_v4, (uint)value); } public int ToHashCode() { uint length = _length; uint num = length % 4; uint num2 = ((length < 4) ? MixEmptyState() : MixState(_v1, _v2, _v3, _v4)); num2 += length * 4; if (num != 0) { num2 = QueueRound(num2, _queue1); if (num > 1) { num2 = QueueRound(num2, _queue2); if (num > 2) { num2 = QueueRound(num2, _queue3); } } } return (int)MixFinal(num2); } } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use SKEncodedOrigin instead.")] public enum SKCodecOrigin { TopLeft = 1, TopRight, BottomRight, BottomLeft, LeftTop, RightTop, RightBottom, LeftBottom } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use SKTextEncoding instead.")] public enum SKEncoding { Utf8, Utf16, Utf32 } public enum SKFontStyleWeight { Invisible = 0, Thin = 100, ExtraLight = 200, Light = 300, Normal = 400, Medium = 500, SemiBold = 600, Bold = 700, ExtraBold = 800, Black = 900, ExtraBlack = 1000 } public enum SKFontStyleWidth { UltraCondensed = 1, ExtraCondensed, Condensed, SemiCondensed, Normal, SemiExpanded, Expanded, ExtraExpanded, UltraExpanded } public enum SKColorType { Unknown, Alpha8, Rgb565, Argb4444, Rgba8888, Rgb888x, Bgra8888, Rgba1010102, Rgb101010x, Gray8, RgbaF16, RgbaF16Clamped, RgbaF32, Rg88, AlphaF16, RgF16, Alpha16, Rg1616, Rgba16161616, Bgra1010102, Bgr101010x } public static class SkiaExtensions { public static bool IsBgr(this SKPixelGeometry pg) { if (pg != SKPixelGeometry.BgrHorizontal) { return pg == SKPixelGeometry.BgrVertical; } return true; } public static bool IsRgb(this SKPixelGeometry pg) { if (pg != SKPixelGeometry.RgbHorizontal) { return pg == SKPixelGeometry.RgbVertical; } return true; } public static bool IsVertical(this SKPixelGeometry pg) { if (pg != SKPixelGeometry.BgrVertical) { return pg == SKPixelGeometry.RgbVertical; } return true; } public static bool IsHorizontal(this SKPixelGeometry pg) { if (pg != SKPixelGeometry.BgrHorizontal) { return pg == SKPixelGeometry.RgbHorizontal; } return true; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete] public static SKTextEncoding ToTextEncoding(this SKEncoding encoding) { return encoding switch { SKEncoding.Utf8 => SKTextEncoding.Utf8, SKEncoding.Utf16 => SKTextEncoding.Utf16, SKEncoding.Utf32 => SKTextEncoding.Utf32, _ => throw new ArgumentOutOfRangeException("encoding"), }; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete] internal static SKEncoding ToEncoding(this SKTextEncoding encoding) { return encoding switch { SKTextEncoding.Utf8 => SKEncoding.Utf8, SKTextEncoding.Utf16 => SKEncoding.Utf16, SKTextEncoding.Utf32 => SKEncoding.Utf32, _ => throw new ArgumentOutOfRangeException("encoding"), }; } public static int GetBytesPerPixel(this SKColorType colorType) { return colorType switch { SKColorType.Unknown => 0, SKColorType.Alpha8 => 1, SKColorType.Gray8 => 1, SKColorType.Rgb565 => 2, SKColorType.Argb4444 => 2, SKColorType.Rg88 => 2, SKColorType.Alpha16 => 2, SKColorType.AlphaF16 => 2, SKColorType.Bgra8888 => 4, SKColorType.Bgra1010102 => 4, SKColorType.Bgr101010x => 4, SKColorType.Rgba8888 => 4, SKColorType.Rgb888x => 4, SKColorType.Rgba1010102 => 4, SKColorType.Rgb101010x => 4, SKColorType.Rg1616 => 4, SKColorType.RgF16 => 4, SKColorType.RgbaF16Clamped => 8, SKColorType.RgbaF16 => 8, SKColorType.Rgba16161616 => 8, SKColorType.RgbaF32 => 16, _ => throw new ArgumentOutOfRangeException("colorType"), }; } public static SKAlphaType GetAlphaType(this SKColorType colorType, SKAlphaType alphaType = SKAlphaType.Premul) { switch (colorType) { case SKColorType.Unknown: alphaType = SKAlphaType.Unknown; break; case SKColorType.Alpha8: case SKColorType.AlphaF16: case SKColorType.Alpha16: if (SKAlphaType.Unpremul == alphaType) { alphaType = SKAlphaType.Premul; } break; case SKColorType.Rgb565: case SKColorType.Rgb888x: case SKColorType.Rgb101010x: case SKColorType.Gray8: case SKColorType.Rg88: case SKColorType.RgF16: case SKColorType.Rg1616: case SKColorType.Bgr101010x: alphaType = SKAlphaType.Opaque; break; default: throw new ArgumentOutOfRangeException("colorType"); case SKColorType.Argb4444: case SKColorType.Rgba8888: case SKColorType.Bgra8888: case SKColorType.Rgba1010102: case SKColorType.RgbaF16: case SKColorType.RgbaF16Clamped: case SKColorType.RgbaF32: case SKColorType.Rgba16161616: case SKColorType.Bgra1010102: break; } return alphaType; } internal static GRBackendNative ToNative(this GRBackend backend) { return backend switch { GRBackend.Metal => GRBackendNative.Metal, GRBackend.OpenGL => GRBackendNative.OpenGL, GRBackend.Vulkan => GRBackendNative.Vulkan, GRBackend.Dawn => GRBackendNative.Dawn, GRBackend.Direct3D => GRBackendNative.Direct3D, _ => throw new ArgumentOutOfRangeException("backend"), }; } internal static GRBackend FromNative(this GRBackendNative backend) { return backend switch { GRBackendNative.Metal => GRBackend.Metal, GRBackendNative.OpenGL => GRBackend.OpenGL, GRBackendNative.Vulkan => GRBackend.Vulkan, GRBackendNative.Dawn => GRBackend.Dawn, GRBackendNative.Direct3D => GRBackend.Direct3D, _ => throw new ArgumentOutOfRangeException("backend"), }; } internal static SKColorTypeNative ToNative(this SKColorType colorType) { return colorType switch { SKColorType.Unknown => SKColorTypeNative.Unknown, SKColorType.Alpha8 => SKColorTypeNative.Alpha8, SKColorType.Rgb565 => SKColorTypeNative.Rgb565, SKColorType.Argb4444 => SKColorTypeNative.Argb4444, SKColorType.Rgba8888 => SKColorTypeNative.Rgba8888, SKColorType.Rgb888x => SKColorTypeNative.Rgb888x, SKColorType.Bgra8888 => SKColorTypeNative.Bgra8888, SKColorType.Rgba1010102 => SKColorTypeNative.Rgba1010102, SKColorType.Rgb101010x => SKColorTypeNative.Rgb101010x, SKColorType.Gray8 => SKColorTypeNative.Gray8, SKColorType.RgbaF16Clamped => SKColorTypeNative.RgbaF16Norm, SKColorType.RgbaF16 => SKColorTypeNative.RgbaF16, SKColorType.RgbaF32 => SKColorTypeNative.RgbaF32, SKColorType.Rg88 => SKColorTypeNative.R8g8Unorm, SKColorType.AlphaF16 => SKColorTypeNative.A16Float, SKColorType.RgF16 => SKColorTypeNative.R16g16Float, SKColorType.Alpha16 => SKColorTypeNative.A16Unorm, SKColorType.Rg1616 => SKColorTypeNative.R16g16Unorm, SKColorType.Rgba16161616 => SKColorTypeNative.R16g16b16a16Unorm, SKColorType.Bgra1010102 => SKColorTypeNative.Bgra1010102, SKColorType.Bgr101010x => SKColorTypeNative.Bgr101010x, _ => throw new ArgumentOutOfRangeException("colorType"), }; } internal static SKColorType FromNative(this SKColorTypeNative colorType) { return colorType switch { SKColorTypeNative.Unknown => SKColorType.Unknown, SKColorTypeNative.Alpha8 => SKColorType.Alpha8, SKColorTypeNative.Rgb565 => SKColorType.Rgb565, SKColorTypeNative.Argb4444 => SKColorType.Argb4444, SKColorTypeNative.Rgba8888 => SKColorType.Rgba8888, SKColorTypeNative.Rgb888x => SKColorType.Rgb888x, SKColorTypeNative.Bgra8888 => SKColorType.Bgra8888, SKColorTypeNative.Rgba1010102 => SKColorType.Rgba1010102, SKColorTypeNative.Rgb101010x => SKColorType.Rgb101010x, SKColorTypeNative.Gray8 => SKColorType.Gray8, SKColorTypeNative.RgbaF16Norm => SKColorType.RgbaF16Clamped, SKColorTypeNative.RgbaF16 => SKColorType.RgbaF16, SKColorTypeNative.RgbaF32 => SKColorType.RgbaF32, SKColorTypeNative.R8g8Unorm => SKColorType.Rg88, SKColorTypeNative.A16Float => SKColorType.AlphaF16, SKColorTypeNative.R16g16Float => SKColorType.RgF16, SKColorTypeNative.A16Unorm => SKColorType.Alpha16, SKColorTypeNative.R16g16Unorm => SKColorType.Rg1616, SKColorTypeNative.R16g16b16a16Unorm => SKColorType.Rgba16161616, SKColorTypeNative.Bgra1010102 => SKColorType.Bgra1010102, SKColorTypeNative.Bgr101010x => SKColorType.Bgr101010x, _ => throw new ArgumentOutOfRangeException("colorType"), }; } public static uint ToGlSizedFormat(this SKColorType colorType) { return colorType switch { SKColorType.Unknown => 0u, SKColorType.Alpha8 => 32828u, SKColorType.Gray8 => 32832u, SKColorType.Rgb565 => 36194u, SKColorType.Argb4444 => 32854u, SKColorType.Rgba8888 => 32856u, SKColorType.Rgb888x => 32849u, SKColorType.Bgra8888 => 37793u, SKColorType.Rgba1010102 => 32857u, SKColorType.AlphaF16 => 33325u, SKColorType.RgbaF16 => 34842u, SKColorType.RgbaF16Clamped => 34842u, SKColorType.Alpha16 => 33322u, SKColorType.Rg1616 => 33324u, SKColorType.Rgba16161616 => 32859u, SKColorType.RgF16 => 33327u, SKColorType.Rg88 => 33323u, SKColorType.Rgb101010x => 0u, SKColorType.RgbaF32 => 0u, _ => throw new ArgumentOutOfRangeException("colorType"), }; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use SKColorType instead.")] public static uint ToGlSizedFormat(this GRPixelConfig config) { return config switch { GRPixelConfig.Unknown => 0u, GRPixelConfig.Alpha8 => 32828u, GRPixelConfig.Alpha8AsAlpha => 32828u, GRPixelConfig.Alpha8AsRed => 32828u, GRPixelConfig.Gray8 => 32832u, GRPixelConfig.Gray8AsLum => 32832u, GRPixelConfig.Gray8AsRed => 32832u, GRPixelConfig.Rgb565 => 36194u, GRPixelConfig.Rgba4444 => 32854u, GRPixelConfig.Rgba8888 => 32856u, GRPixelConfig.Rgb888 => 32849u, GRPixelConfig.Rgb888x => 32856u, GRPixelConfig.Rg88 => 33323u, GRPixelConfig.Bgra8888 => 37793u, GRPixelConfig.Srgba8888 => 35907u, GRPixelConfig.Rgba1010102 => 32857u, GRPixelConfig.AlphaHalf => 33325u, GRPixelConfig.AlphaHalfAsLum => 34846u, GRPixelConfig.AlphaHalfAsRed => 33325u, GRPixelConfig.RgbaHalf => 34842u, GRPixelConfig.RgbaHalfClamped => 34842u, GRPixelConfig.RgbEtc1 => 36196u, GRPixelConfig.Alpha16 => 33322u, GRPixelConfig.Rg1616 => 33324u, GRPixelConfig.Rgba16161616 => 32859u, GRPixelConfig.RgHalf => 33327u, _ => throw new ArgumentOutOfRangeException("config"), }; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use SKColorType instead.")] public static GRPixelConfig ToPixelConfig(this SKColorType colorType) { return colorType switch { SKColorType.Unknown => GRPixelConfig.Unknown, SKColorType.Alpha8 => GRPixelConfig.Alpha8, SKColorType.Gray8 => GRPixelConfig.Gray8, SKColorType.Rgb565 => GRPixelConfig.Rgb565, SKColorType.Argb4444 => GRPixelConfig.Rgba4444, SKColorType.Rgba8888 => GRPixelConfig.Rgba8888, SKColorType.Rgb888x => GRPixelConfig.Rgb888, SKColorType.Bgra8888 => GRPixelConfig.Bgra8888, SKColorType.Rgba1010102 => GRPixelConfig.Rgba1010102, SKColorType.Bgra1010102 => GRPixelConfig.Unknown, SKColorType.AlphaF16 => GRPixelConfig.AlphaHalf, SKColorType.RgbaF16 => GRPixelConfig.RgbaHalf, SKColorType.RgbaF16Clamped => GRPixelConfig.RgbaHalfClamped, SKColorType.Alpha16 => GRPixelConfig.Alpha16, SKColorType.Rg1616 => GRPixelConfig.Rg1616, SKColorType.Rgba16161616 => GRPixelConfig.Rgba16161616, SKColorType.RgF16 => GRPixelConfig.RgHalf, SKColorType.Rg88 => GRPixelConfig.Rg88, SKColorType.Rgb101010x => GRPixelConfig.Unknown, SKColorType.Bgr101010x => GRPixelConfig.Unknown, SKColorType.RgbaF32 => GRPixelConfig.Unknown, _ => throw new ArgumentOutOfRangeException("colorType"), }; } [Obsolete("Use SKColorType instead.")] public static SKColorType ToColorType(this GRPixelConfig config) { return config switch { GRPixelConfig.Unknown => SKColorType.Unknown, GRPixelConfig.Alpha8 => SKColorType.Alpha8, GRPixelConfig.Gray8 => SKColorType.Gray8, GRPixelConfig.Rgb565 => SKColorType.Rgb565, GRPixelConfig.Rgba4444 => SKColorType.Argb4444, GRPixelConfig.Rgba8888 => SKColorType.Rgba8888, GRPixelConfig.Rgb888 => SKColorType.Rgb888x, GRPixelConfig.Bgra8888 => SKColorType.Bgra8888, GRPixelConfig.Srgba8888 => SKColorType.Rgba8888, GRPixelConfig.Rgba1010102 => SKColorType.Rgba1010102, GRPixelConfig.AlphaHalf => SKColorType.AlphaF16, GRPixelConfig.RgbaHalf => SKColorType.RgbaF16, GRPixelConfig.Alpha8AsAlpha => SKColorType.Alpha8, GRPixelConfig.Alpha8AsRed => SKColorType.Alpha8, GRPixelConfig.AlphaHalfAsLum => SKColorType.AlphaF16, GRPixelConfig.AlphaHalfAsRed => SKColorType.AlphaF16, GRPixelConfig.Gray8AsLum => SKColorType.Gray8, GRPixelConfig.Gray8AsRed => SKColorType.Gray8, GRPixelConfig.RgbaHalfClamped => SKColorType.RgbaF16Clamped, GRPixelConfig.Alpha16 => SKColorType.Alpha16, GRPixelConfig.Rg1616 => SKColorType.Rg1616, GRPixelConfig.Rgba16161616 => SKColorType.Rgba16161616, GRPixelConfig.RgHalf => SKColorType.RgF16, GRPixelConfig.Rg88 => SKColorType.Rg88, GRPixelConfig.Rgb888x => SKColorType.Rgb888x, GRPixelConfig.RgbEtc1 => SKColorType.Rgb888x, _ => throw new ArgumentOutOfRangeException("config"), }; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete] public static SKFilterQuality ToFilterQuality(this SKBitmapResizeMethod method) { switch (method) { case SKBitmapResizeMethod.Box: case SKBitmapResizeMethod.Triangle: return SKFilterQuality.Low; case SKBitmapResizeMethod.Lanczos3: return SKFilterQuality.Medium; case SKBitmapResizeMethod.Hamming: case SKBitmapResizeMethod.Mitchell: return SKFilterQuality.High; default: return SKFilterQuality.Medium; } } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete] public static SKColorSpaceTransferFn ToColorSpaceTransferFn(this SKColorSpaceRenderTargetGamma gamma) { return gamma switch { SKColorSpaceRenderTargetGamma.Linear => SKColorSpaceTransferFn.Linear, SKColorSpaceRenderTargetGamma.Srgb => SKColorSpaceTransferFn.Srgb, _ => throw new ArgumentOutOfRangeException("gamma"), }; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete] public static SKColorSpaceTransferFn ToColorSpaceTransferFn(this SKNamedGamma gamma) { return gamma switch { SKNamedGamma.Linear => SKColorSpaceTransferFn.Linear, SKNamedGamma.Srgb => SKColorSpaceTransferFn.Srgb, SKNamedGamma.TwoDotTwoCurve => SKColorSpaceTransferFn.TwoDotTwo, SKNamedGamma.NonStandard => SKColorSpaceTransferFn.Empty, _ => throw new ArgumentOutOfRangeException("gamma"), }; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete] public static SKColorSpaceXyz ToColorSpaceXyz(this SKColorSpaceGamut gamut) { return gamut switch { SKColorSpaceGamut.AdobeRgb => SKColorSpaceXyz.AdobeRgb, SKColorSpaceGamut.Dcip3D65 => SKColorSpaceXyz.Dcip3, SKColorSpaceGamut.Rec2020 => SKColorSpaceXyz.Rec2020, SKColorSpaceGamut.Srgb => SKColorSpaceXyz.Srgb, _ => throw new ArgumentOutOfRangeException("gamut"), }; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete] public static SKColorSpaceXyz ToColorSpaceXyz(this SKMatrix44 matrix) { if (matrix == null) { throw new ArgumentNullException("matrix"); } float[] array = matrix.ToRowMajor(); return new SKColorSpaceXyz(array[0], array[1], array[2], array[4], array[5], array[6], array[8], array[9], array[10]); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use SKColorChannel instead.")] public static SKColorChannel ToColorChannel(this SKDisplacementMapEffectChannelSelectorType channelSelectorType) { return channelSelectorType switch { SKDisplacementMapEffectChannelSelectorType.R => SKColorChannel.R, SKDisplacementMapEffectChannelSelectorType.G => SKColorChannel.G, SKDisplacementMapEffectChannelSelectorType.B => SKColorChannel.B, SKDisplacementMapEffectChannelSelectorType.A => SKColorChannel.A, _ => SKColorChannel.B, }; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use SKShaderTileMode instead.")] public static SKShaderTileMode ToShaderTileMode(this SKMatrixConvolutionTileMode tileMode) { return tileMode switch { SKMatrixConvolutionTileMode.Clamp => SKShaderTileMode.Clamp, SKMatrixConvolutionTileMode.Repeat => SKShaderTileMode.Repeat, _ => SKShaderTileMode.Decal, }; } } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use SKSurfaceProperties instead.")] public struct SKSurfaceProps : IEquatable<SKSurfaceProps> { public SKPixelGeometry PixelGeometry { get; set; } public SKSurfacePropsFlags Flags { get; set; } public readonly bool Equals(SKSurfaceProps obj) { if (PixelGeometry == obj.PixelGeometry) { return Flags == obj.Flags; } return false; } public override readonly bool Equals(object obj) { if (obj is SKSurfaceProps obj2) { return Equals(obj2); } return false; } public static bool operator ==(SKSurfaceProps left, SKSurfaceProps right) { return left.Equals(right); } public static bool operator !=(SKSurfaceProps left, SKSurfaceProps right) { return !left.Equals(right); } public override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(PixelGeometry); hashCode.Add(Flags); return hashCode.ToHashCode(); } } public struct SKCodecOptions : IEquatable<SKCodecOptions> { public static readonly SKCodecOptions Default; public SKZeroInitialized ZeroInitialized { get; set; } public SKRectI? Subset { get; set; } public readonly bool HasSubset => Subset.HasValue; public int FrameIndex { get; set; } public int PriorFrame { get; set; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete] public SKTransferFunctionBehavior PremulBehavior { readonly get { return SKTransferFunctionBehavior.Respect; } set { } } static SKCodecOptions() { Default = new SKCodecOptions(SKZeroInitialized.No); } public SKCodecOptions(SKZeroInitialized zeroInitialized) { ZeroInitialized = zeroInitialized; Subset = null; FrameIndex = 0; PriorFrame = -1; } public SKCodecOptions(SKZeroInitialized zeroInitialized, SKRectI subset) { ZeroInitialized = zeroInitialized; Subset = subset; FrameIndex = 0; PriorFrame = -1; } public SKCodecOptions(SKRectI subset) { ZeroInitialized = SKZeroInitialized.No; Subset = subset; FrameIndex = 0; PriorFrame = -1; } public SKCodecOptions(int frameIndex) { ZeroInitialized = SKZeroInitialized.No; Subset = null; FrameIndex = frameIndex; PriorFrame = -1; } public SKCodecOptions(int frameIndex, int priorFrame) { ZeroInitialized = SKZeroInitialized.No; Subset = null; FrameIndex = frameIndex; PriorFrame = priorFrame; } public readonly bool Equals(SKCodecOptions obj) { if (ZeroInitialized == obj.ZeroInitialized) { SKRectI? subset = Subset; SKRectI? subset2 = obj.Subset; if (subset.HasValue == subset2.HasValue && (!subset.HasValue || subset.GetValueOrDefault() == subset2.GetValueOrDefault()) && FrameIndex == obj.FrameIndex) { return PriorFrame == obj.PriorFrame; } } return false; } public override readonly bool Equals(object obj) { if (obj is SKCodecOptions obj2) { return Equals(obj2); } return false; } public static bool operator ==(SKCodecOptions left, SKCodecOptions right) { return left.Equals(right); } public static bool operator !=(SKCodecOptions left, SKCodecOptions right) { return !left.Equals(right); } public override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(ZeroInitialized); hashCode.Add(Subset); hashCode.Add(FrameIndex); hashCode.Add(PriorFrame); return hashCode.ToHashCode(); } } public struct SKFontMetrics : IEquatable<SKFontMetrics> { private const uint flagsUnderlineThicknessIsValid = 1u; private const uint flagsUnderlinePositionIsValid = 2u; private const uint flagsStrikeoutThicknessIsValid = 4u; private const uint flagsStrikeoutPositionIsValid = 8u; private uint fFlags; private float fTop; private float fAscent; private float fDescent; private float fBottom; private float fLeading; private float fAvgCharWidth; private float fMaxCharWidth; private float fXMin; private float fXMax; private float fXHeight; private float fCapHeight; private float fUnderlineThickness; private float fUnderlinePosition; private float fStrikeoutThickness; private float fStrikeoutPosition; public readonly float Top => fTop; public readonly float Ascent => fAscent; public readonly float Descent => fDescent; public readonly float Bottom => fBottom; public readonly float Leading => fLeading; public readonly float AverageCharacterWidth => fAvgCharWidth; public readonly float MaxCharacterWidth => fMaxCharWidth; public readonly float XMin => fXMin; public readonly float XMax => fXMax; public readonly float XHeight => fXHeight; public readonly float CapHeight => fCapHeight; public readonly float? UnderlineThickness => GetIfValid(fUnderlineThickness, 1u); public readonly float? UnderlinePosition => GetIfValid(fUnderlinePosition, 2u); public readonly float? StrikeoutThickness => GetIfValid(fStrikeoutThickness, 4u); public readonly float? StrikeoutPosition => GetIfValid(fStrikeoutPosition, 8u); private readonly float? GetIfValid(float value, uint flag) { if ((fFlags & flag) != flag) { return null; } return value; } public readonly bool Equals(SKFontMetrics obj) { if (fFlags == obj.fFlags && fTop == obj.fTop && fAscent == obj.fAscent && fDescent == obj.fDescent && fBottom == obj.fBottom && fLeading == obj.fLeading && fAvgCharWidth == obj.fAvgCharWidth && fMaxCharWidth == obj.fMaxCharWidth && fXMin == obj.fXMin && fXMax == obj.fXMax && fXHeight == obj.fXHeight && fCapHeight == obj.fCapHeight && fUnderlineThickness == obj.fUnderlineThickness && fUnderlinePosition == obj.fUnderlinePosition && fStrikeoutThickness == obj.fStrikeoutThickness) { return fStrikeoutPosition == obj.fStrikeoutPosition; } return false; } public override readonly bool Equals(object obj) { if (obj is SKFontMetrics obj2) { return Equals(obj2); } return false; } public static bool operator ==(SKFontMetrics left, SKFontMetrics right) { return left.Equals(right); } public static bool operator !=(SKFontMetrics left, SKFontMetrics right) { return !left.Equals(right); } public override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(fFlags); hashCode.Add(fTop); hashCode.Add(fAscent); hashCode.Add(fDescent); hashCode.Add(fBottom); hashCode.Add(fLeading); hashCode.Add(fAvgCharWidth); hashCode.Add(fMaxCharWidth); hashCode.Add(fXMin); hashCode.Add(fXMax); hashCode.Add(fXHeight); hashCode.Add(fCapHeight); hashCode.Add(fUnderlineThickness); hashCode.Add(fUnderlinePosition); hashCode.Add(fStrikeoutThickness); hashCode.Add(fStrikeoutPosition); return hashCode.ToHashCode(); } } public struct SKLattice : IEquatable<SKLattice> { public int[] XDivs { get; set; } public int[] YDivs { get; set; } public SKLatticeRectType[] RectTypes { get; set; } public SKRectI? Bounds { get; set; } public SKColor[] Colors { get; set; } public readonly bool Equals(SKLattice obj) { if (XDivs == obj.XDivs && YDivs == obj.YDivs && RectTypes == obj.RectTypes && Bounds == obj.Bounds) { return Colors == obj.Colors; } return false; } public override readonly bool Equals(object obj) { if (obj is SKLattice obj2) { return Equals(obj2); } return false; } public static bool operator ==(SKLattice left, SKLattice right) { return left.Equals(right); } public static bool operator !=(SKLattice left, SKLattice right) { return !left.Equals(right); } public override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(XDivs); hashCode.Add(YDivs); hashCode.Add(RectTypes); hashCode.Add(Bounds); hashCode.Add(Colors); return hashCode.ToHashCode(); } } internal struct SKTimeDateTimeInternal : IEquatable<SKTimeDateTimeInternal> { public short fTimeZoneMinutes; public ushort fYear; public byte fMonth; public byte fDayOfWeek; public byte fDay; public byte fHour; public byte fMinute; public byte fSecond; public static SKTimeDateTimeInternal Create(DateTime datetime) { int num = datetime.Hour - datetime.ToUniversalTime().Hour; return new SKTimeDateTimeInternal { fTimeZoneMinutes = (short)(num * 60), fYear = (ushort)datetime.Year, fMonth = (byte)datetime.Month, fDayOfWeek = (byte)datetime.DayOfWeek, fDay = (byte)datetime.Day, fHour = (byte)datetime.Hour, fMinute = (byte)datetime.Minute, fSecond = (byte)datetime.Second }; } public readonly bool Equals(SKTimeDateTimeInternal obj) { if (fTimeZoneMinutes == obj.fTimeZoneMinutes && fYear == obj.fYear && fMonth == obj.fMonth && fDayOfWeek == obj.fDayOfWeek && fDay == obj.fDay && fHour == obj.fHour && fMinute == obj.fMinute) { return fSecond == obj.fSecond; } return false; } public override readonly bool Equals(object obj) { if (obj is SKTimeDateTimeInternal obj2) { return Equals(obj2); } return false; } public static bool operator ==(SKTimeDateTimeInternal left, SKTimeDateTimeInternal right) { return left.Equals(right); } public static bool operator !=(SKTimeDateTimeInternal left, SKTimeDateTimeInternal right) { return !left.Equals(right); } public override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(fTimeZoneMinutes); hashCode.Add(fYear); hashCode.Add(fMonth); hashCode.Add(fDayOfWeek); hashCode.Add(fDay); hashCode.Add(fHour); hashCode.Add(fMinute); hashCode.Add(fSecond); return hashCode.ToHashCode(); } } public struct SKDocumentPdfMetadata : IEquatable<SKDocumentPdfMetadata> { public const float DefaultRasterDpi = 72f; public const int DefaultEncodingQuality = 101; public static readonly SKDocumentPdfMetadata Default; public string Title { get; set; } public string Author { get; set; } public string Subject { get; set; } public string Keywords { get; set; } public string Creator { get; set; } public string Producer { get; set; } public DateTime? Creation { get; set; } public DateTime? Modified { get; set; } public float RasterDpi { get; set; } public bool PdfA { get; set; } public int EncodingQuality { get; set; } static SKDocumentPdfMetadata() { Default = new SKDocumentPdfMetadata { RasterDpi = 72f, PdfA = false, EncodingQuality = 101 }; } public SKDocumentPdfMetadata(float rasterDpi) { Title = null; Author = null; Subject = null; Keywords = null; Creator = null; Producer = null; Creation = null; Modified = null; RasterDpi = rasterDpi; PdfA = false; EncodingQuality = 101; } public SKDocumentPdfMetadata(int encodingQuality) { Title = null; Author = null; Subject = null; Keywords = null; Creator = null; Producer = null; Creation = null; Modified = null; RasterDpi = 72f; PdfA = false; EncodingQuality = encodingQuality; } public SKDocumentPdfMetadata(float rasterDpi, int encodingQuality) { Title = null; Author = null; Subject = null; Keywords = null; Creator = null; Producer = null; Creation = null; Modified = null; RasterDpi = rasterDpi; PdfA = false; EncodingQuality = encodingQuality; } public readonly bool Equals(SKDocumentPdfMetadata obj) { if (Title == obj.Title && Author == obj.Author && Subject == obj.Subject && Keywords == obj.Keywords && Creator == obj.Creator && Producer == obj.Producer && Creation == obj.Creation) { DateTime? modified = Modified; DateTime? modified2 = obj.Modified; if (modified.HasValue == modified2.HasValue && (!modified.HasValue || modified.GetValueOrDefault() == modified2.GetValueOrDefault()) && RasterDpi == obj.RasterDpi && PdfA == obj.PdfA) { return EncodingQuality == obj.EncodingQuality; } } return false; } public override readonly bool Equals(object obj) { if (obj is SKDocumentPdfMetadata obj2) { return Equals(obj2); } return false; } public static bool operator ==(SKDocumentPdfMetadata left, SKDocumentPdfMetadata right) { return left.Equals(right); } public static bool operator !=(SKDocumentPdfMetadata left, SKDocumentPdfMetadata right) { return !left.Equals(right); } public override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(Title); hashCode.Add(Author); hashCode.Add(Subject); hashCode.Add(Keywords); hashCode.Add(Creator); hashCode.Add(Producer); hashCode.Add(Creation); hashCode.Add(Modified); hashCode.Add(RasterDpi); hashCode.Add(PdfA); hashCode.Add(EncodingQuality); return hashCode.ToHashCode(); } } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete] [Flags] public enum SKColorSpaceFlags { None = 0, NonLinearBlending = 1 } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete] public enum SKTransferFunctionBehavior { Ignore = 1, Respect = 0 } public struct SKHighContrastConfig : IEquatable<SKHighContrastConfig> { public static readonly SKHighContrastConfig Default; private byte fGrayscale; private SKHighContrastConfigInvertStyle fInvertStyle; private float fContrast; public readonly bool IsValid { get { if (fInvertStyle >= SKHighContrastConfigInvertStyle.NoInvert && fInvertStyle <= SKHighContrastConfigInvertStyle.InvertLightness && (double)fContrast >= -1.0) { return (double)fContrast <= 1.0; } return false; } } public bool Grayscale { readonly get { return fGrayscale > 0; } set { fGrayscale = (value ? ((byte)1) : ((byte)0)); } } public SKHighContrastConfigInvertStyle InvertStyle { readonly get { return fInvertStyle; } set { fInvertStyle = value; } } public float Contrast { readonly get { return fContrast; } set { fContrast = value; } } static SKHighContrastConfig() { Default = new SKHighContrastConfig(grayscale: false, SKHighContrastConfigInvertStyle.NoInvert, 0f); } public SKHighContrastConfig(bool grayscale, SKHighContrastConfigInvertStyle invertStyle, float contrast) { fGrayscale = (grayscale ? ((byte)1) : ((byte)0)); fInvertStyle = invertStyle; fContrast = contrast; } public readonly bool Equals(SKHighContrastConfig obj) { if (fGrayscale == obj.fGrayscale && fInvertStyle == obj.fInvertStyle) { return fContrast == obj.fContrast; } return false; } public override readonly bool Equals(object obj) { if (obj is SKHighContrastConfig obj2) { return Equals(obj2); } return false; } public static bool operator ==(SKHighContrastConfig left, SKHighContrastConfig right) { return left.Equals(right); } public static bool operator !=(SKHighContrastConfig left, SKHighContrastConfig right) { return !left.Equals(right); } public override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(fGrayscale); hashCode.Add(fInvertStyle); hashCode.Add(fContrast); return hashCode.ToHashCode(); } } public struct SKPngEncoderOptions : IEquatable<SKPngEncoderOptions> { public static readonly SKPngEncoderOptions Default; private SKPngEncoderFilterFlags fFilterFlags; private int fZLibLevel; private unsafe void* fComments; public SKPngEncoderFilterFlags FilterFlags { readonly get { return fFilterFlags; } set { fFilterFlags = value; } } public int ZLibLevel { readonly get { return fZLibLevel; } set { fZLibLevel = value; } } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete] public SKTransferFunctionBehavior UnpremulBehavior { readonly get { return SKTransferFunctionBehavior.Respect; } set { } } static SKPngEncoderOptions() { Default = new SKPngEncoderOptions(SKPngEncoderFilterFlags.AllFilters, 6); } public unsafe SKPngEncoderOptions(SKPngEncoderFilterFlags filterFlags, int zLibLevel) { fFilterFlags = filterFlags; fZLibLevel = zLibLevel; fComments = null; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Using SKPngEncoderOptions(SKPngEncoderFilterFlags, int) instead.")] public unsafe SKPngEncoderOptions(SKPngEncoderFilterFlags filterFlags, int zLibLevel, SKTransferFunctionBehavior unpremulBehavior) { fFilterFlags = filterFlags; fZLibLevel = zLibLevel; fComments = null; } public unsafe readonly bool Equals(SKPngEncoderOptions obj) { if (fFilterFlags == obj.fFilterFlags && fZLibLevel == obj.fZLibLevel) { return fComments == obj.fComments; } return false; } public override readonly bool Equals(object obj) { if (obj is SKPngEncoderOptions obj2) { return Equals(obj2); } return false; } public static bool operator ==(SKPngEncoderOptions left, SKPngEncoderOptions right) { return left.Equals(right); } public static bool operator !=(SKPngEncoderOptions left, SKPngEncoderOptions right) { return !left.Equals(right); } public unsafe override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(fFilterFlags); hashCode.Add(fZLibLevel); hashCode.Add(fComments); return hashCode.ToHashCode(); } } public struct SKJpegEncoderOptions : IEquatable<SKJpegEncoderOptions> { public static readonly SKJpegEncoderOptions Default; private int fQuality; private SKJpegEncoderDownsample fDownsample; private SKJpegEncoderAlphaOption fAlphaOption; [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete] public SKTransferFunctionBehavior BlendBehavior { readonly get { return SKTransferFunctionBehavior.Respect; } set { } } public int Quality { readonly get { return fQuality; } set { fQuality = value; } } public SKJpegEncoderDownsample Downsample { readonly get { return fDownsample; } set { fDownsample = value; } } public SKJpegEncoderAlphaOption AlphaOption { readonly get { return fAlphaOption; } set { fAlphaOption = value; } } static SKJpegEncoderOptions() { Default = new SKJpegEncoderOptions(100, SKJpegEncoderDownsample.Downsample420, SKJpegEncoderAlphaOption.Ignore); } public SKJpegEncoderOptions(int quality, SKJpegEncoderDownsample downsample, SKJpegEncoderAlphaOption alphaOption) { fQuality = quality; fDownsample = downsample; fAlphaOption = alphaOption; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use SKJpegEncoderOptions(int, SKJpegEncoderDownsample, SKJpegEncoderAlphaOption) instead.")] public SKJpegEncoderOptions(int quality, SKJpegEncoderDownsample downsample, SKJpegEncoderAlphaOption alphaOption, SKTransferFunctionBehavior blendBehavior) { fQuality = quality; fDownsample = downsample; fAlphaOption = alphaOption; } public readonly bool Equals(SKJpegEncoderOptions obj) { if (fQuality == obj.fQuality && fDownsample == obj.fDownsample) { return fAlphaOption == obj.fAlphaOption; } return false; } public override readonly bool Equals(object obj) { if (obj is SKJpegEncoderOptions obj2) { return Equals(obj2); } return false; } public static bool operator ==(SKJpegEncoderOptions left, SKJpegEncoderOptions right) { return left.Equals(right); } public static bool operator !=(SKJpegEncoderOptions left, SKJpegEncoderOptions right) { return !left.Equals(right); } public override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(fQuality); hashCode.Add(fDownsample); hashCode.Add(fAlphaOption); return hashCode.ToHashCode(); } } public struct SKWebpEncoderOptions : IEquatable<SKWebpEncoderOptions> { public static readonly SKWebpEncoderOptions Default; private SKWebpEncoderCompression fCompression; private float fQuality; [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete] public SKTransferFunctionBehavior UnpremulBehavior { readonly get { return SKTransferFunctionBehavior.Respect; } set { } } public SKWebpEncoderCompression Compression { readonly get { return fCompression; } set { fCompression = value; } } public float Quality { readonly get { return fQuality; } set { fQuality = value; } } static SKWebpEncoderOptions() { Default = new SKWebpEncoderOptions(SKWebpEncoderCompression.Lossy, 100f); } public SKWebpEncoderOptions(SKWebpEncoderCompression compression, float quality) { fCompression = compression; fQuality = quality; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use SKWebpEncoderOptions(SKWebpEncoderCompression, float) instead.")] public SKWebpEncoderOptions(SKWebpEncoderCompression compression, float quality, SKTransferFunctionBehavior unpremulBehavior) { fCompression = compression; fQuality = quality; } public readonly bool Equals(SKWebpEncoderOptions obj) { if (fCompression == obj.fCompression) { return fQuality == obj.fQuality; } return false; } public override readonly bool Equals(object obj) { if (obj is SKWebpEncoderOptions obj2) { return Equals(obj2); } return false; } public static bool operator ==(SKWebpEncoderOptions left, SKWebpEncoderOptions right) { return left.Equals(right); } public static bool operator !=(SKWebpEncoderOptions left, SKWebpEncoderOptions right) { return !left.Equals(right); } public override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(fCompression); hashCode.Add(fQuality); return hashCode.ToHashCode(); } } public delegate void SKBitmapReleaseDelegate(IntPtr address, object context); public delegate void SKDataReleaseDelegate(IntPtr address, object context); public delegate void SKImageRasterReleaseDelegate(IntPtr pixels, object context); public delegate void SKImageTextureReleaseDelegate(object context); public delegate void SKSurfaceReleaseDelegate(IntPtr address, object context); [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use GRGlGetProcedureAddressDelegate instead.")] public delegate IntPtr GRGlGetProcDelegate(object context, string name); public delegate IntPtr GRGlGetProcedureAddressDelegate(string name); public delegate IntPtr GRVkGetProcedureAddressDelegate(string name, IntPtr instance, IntPtr device); public delegate void SKGlyphPathDelegate(SKPath path, SKMatrix matrix); public enum GRBackend { Metal, OpenGL, Vulkan, Dawn, Direct3D } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use SKColorType instead.")] public enum GRPixelConfig { Unknown, Alpha8, Gray8, Rgb565, Rgba4444, Rgba8888, Rgb888, Bgra8888, Srgba8888, [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("The pixel configuration 'sBGRA 8888' is no longer supported in the native library.", true)] Sbgra8888, Rgba1010102, [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("The pixel configuration 'floating-point RGBA' is no longer supported in the native library.", true)] RgbaFloat, [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("The pixel configuration 'floating-point RG' is no longer supported in the native library.", true)] RgFloat, AlphaHalf, RgbaHalf, Alpha8AsAlpha, Alpha8AsRed, AlphaHalfAsLum, AlphaHalfAsRed, Gray8AsLum, Gray8AsRed, RgbaHalfClamped, Alpha16, Rg1616, Rgba16161616, RgHalf, Rg88, Rgb888x, RgbEtc1 } public class GRBackendRenderTarget : SKObject, ISKSkipObjectRegistration { public bool IsValid => SkiaApi.gr_backendrendertarget_is_valid(Handle); public int Width => SkiaApi.gr_backendrendertarget_get_width(Handle); public int Height => SkiaApi.gr_backendrendertarget_get_height(Handle); public int SampleCount => SkiaApi.gr_backendrendertarget_get_samples(Handle); public int StencilBits => SkiaApi.gr_backendrendertarget_get_stencils(Handle); public GRBackend Backend => SkiaApi.gr_backendrendertarget_get_backend(Handle).FromNative(); public SKSizeI Size => new SKSizeI(Width, Height); public SKRectI Rect => new SKRectI(0, 0, Width, Height); internal GRBackendRenderTarget(IntPtr handle, bool owns) : base(handle, owns) { } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use GRBackendRenderTarget(int, int, int, int, GRGlFramebufferInfo) instead.")] public GRBackendRenderTarget(GRBackend backend, GRBackendRenderTargetDesc desc) : this(IntPtr.Zero, owns: true) { switch (backend) { case GRBackend.Metal: throw new NotSupportedException(); case GRBackend.OpenGL: CreateGl(glInfo: new GRGlFramebufferInfo((uint)(int)desc.RenderTargetHandle, desc.Config.ToGlSizedFormat()), width: desc.Width, height: desc.Height, sampleCount: desc.SampleCount, stencilBits: desc.StencilBits); break; case GRBackend.Vulkan: throw new NotSupportedException(); case GRBackend.Dawn: throw new NotSupportedException(); default: throw new ArgumentOutOfRangeException("backend"); } } public GRBackendRenderTarget(int width, int height, int sampleCount, int stencilBits, GRGlFramebufferInfo glInfo) : this(IntPtr.Zero, owns: true) { CreateGl(width, height, sampleCount, stencilBits, glInfo); } public GRBackendRenderTarget(int width, int height, int sampleCount, GRVkImageInfo vkImageInfo) : this(IntPtr.Zero, owns: true) { CreateVulkan(width, height, sampleCount, vkImageInfo); } private unsafe void CreateGl(int width, int height, int sampleCount, int stencilBits, GRGlFramebufferInfo glInfo) { Handle = SkiaApi.gr_backendrendertarget_new_gl(width, height, sampleCount, stencilBits, &glInfo); if (Handle == IntPtr.Zero) { throw new InvalidOperationException("Unable to create a new GRBackendRenderTarget instance."); } } private unsafe void CreateVulkan(int width, int height, int sampleCount, GRVkImageInfo vkImageInfo) { Handle = SkiaApi.gr_backendrendertarget_new_vulkan(width, height, sampleCount, &vkImageInfo); if (Handle == IntPtr.Zero) { throw new InvalidOperationException("Unable to create a new GRBackendRenderTarget instance."); } } protected override void Dispose(bool disposing) { base.Dispose(disposing); } protected override void DisposeNative() { SkiaApi.gr_backendrendertarget_delete(Handle); } public GRGlFramebufferInfo GetGlFramebufferInfo() { if (!GetGlFramebufferInfo(out var glInfo)) { return default(GRGlFramebufferInfo); } return glInfo; } public unsafe bool GetGlFramebufferInfo(out GRGlFramebufferInfo glInfo) { fixed (GRGlFramebufferInfo* glInfo2 = &glInfo) { return SkiaApi.gr_backendrendertarget_get_gl_framebufferinfo(Handle, glInfo2); } } } public class GRBackendTexture : SKObject, ISKSkipObjectRegistration { [Obsolete] internal struct GRTextureInfoObsolete { public uint fTarget; public uint fID; } public bool IsValid => SkiaApi.gr_backendtexture_is_valid(Handle); public int Width => SkiaApi.gr_backendtexture_get_width(Handle); public int Height => SkiaApi.gr_backendtexture_get_height(Handle); public bool HasMipMaps => SkiaApi.gr_backendtexture_has_mipmaps(Handle); public GRBackend Backend => SkiaApi.gr_backendtexture_get_backend(Handle).FromNative(); public SKSizeI Size => new SKSizeI(Width, Height); public SKRectI Rect => new SKRectI(0, 0, Width, Height); internal GRBackendTexture(IntPtr handle, bool owns) : base(handle, owns) { } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use GRBackendTexture(int, int, bool, GRGlTextureInfo) instead.")] public GRBackendTexture(GRGlBackendTextureDesc desc) : this(IntPtr.Zero, owns: true) { GRGlTextureInfo textureHandle = desc.TextureHandle; if (textureHandle.Format == 0) { textureHandle.Format = desc.Config.ToGlSizedFormat(); } CreateGl(desc.Width, desc.Height, mipmapped: false, textureHandle); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use GRBackendTexture(int, int, bool, GRGlTextureInfo) instead.")] public GRBackendTexture(GRBackendTextureDesc desc) : this(IntPtr.Zero, owns: true) { IntPtr textureHandle = desc.TextureHandle; GRTextureInfoObsolete gRTextureInfoObsolete = Marshal.PtrToStructure<GRTextureInfoObsolete>(textureHandle); CreateGl(glInfo: new GRGlTextureInfo(gRTextureInfoObsolete.fTarget, gRTextureInfoObsolete.fID, desc.Config.ToGlSizedFormat()), width: desc.Width, height: desc.Height, mipmapped: false); } public GRBackendTexture(int width, int height, bool mipmapped, GRGlTextureInfo glInfo) : this(IntPtr.Zero, owns: true) { CreateGl(width, height, mipmapped, glInfo); } public GRBackendTexture(int width, int height, GRVkImageInfo vkInfo) : this(IntPtr.Zero, owns: true) { CreateVulkan(width, height, vkInfo); } private unsafe void CreateGl(int width, int height, bool mipmapped, GRGlTextureInfo glInfo) { Handle = SkiaApi.gr_backendtexture_new_gl(width, height, mipmapped, &glInfo); if (Handle == IntPtr.Zero) { throw new InvalidOperationException("Unable to create a new GRBackendTexture instance."); } } private unsafe void CreateVulkan(int width, int height, GRVkImageInfo vkInfo) { Handle = SkiaApi.gr_backendtexture_new_vulkan(width, height, &vkInfo); if (Handle == IntPtr.Zero) { throw new InvalidOperationException("Unable to create a new GRBackendTexture instance."); } } protected override void Dispose(bool disposing) { base.Dispose(disposing); } protected override void DisposeNative() { SkiaApi.gr_backendtexture_delete(Handle); } public GRGlTextureInfo GetGlTextureInfo() { if (!GetGlTextureInfo(out var glInfo)) { return default(GRGlTextureInfo); } return glInfo; } public unsafe bool GetGlTextureInfo(out GRGlTextureInfo glInfo) { fixed (GRGlTextureInfo* glInfo2 = &glInfo) { return SkiaApi.gr_backendtexture_get_gl_textureinfo(Handle, glInfo2); } } } public class GRContext : GRRecordingContext { public new GRBackend Backend => base.Backend; public bool IsAbandoned => SkiaApi.gr_direct_context_is_abandoned(Handle); internal GRContext(IntPtr h, bool owns) : base(h, owns) { } protected override void Dispose(bool disposing) { base.Dispose(disposing); } protected override void DisposeNative() { AbandonContext(); base.DisposeNative(); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use CreateGl() instead.")] public static GRContext Create(GRBackend backend) { return backend switch { GRBackend.Metal => throw new NotSupportedException(), GRBackend.OpenGL => CreateGl(), GRBackend.Vulkan => throw new NotSupportedException(), GRBackend.Dawn => throw new NotSupportedException(), _ => throw new ArgumentOutOfRangeException("backend"), }; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use CreateGl(GRGlInterface) instead.")] public static GRContext Create(GRBackend backend, GRGlInterface backendContext) { return backend switch { GRBackend.Metal => throw new NotSupportedException(), GRBackend.OpenGL => CreateGl(backendContext), GRBackend.Vulkan => throw new NotSupportedException(), GRBackend.Dawn => throw new NotSupportedException(), _ => throw new ArgumentOutOfRangeException("backend"), }; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use CreateGl(GRGlInterface) instead.")] public static GRContext Create(GRBackend backend, IntPtr backendContext) { return backend switch { GRBackend.Metal => throw new NotSupportedException(), GRBackend.OpenGL => GetObject(SkiaApi.gr_direct_context_make_gl(backendContext)), GRBackend.Vulkan => throw new NotSupportedException(), GRBackend.Dawn => throw new NotSupportedException(), _ => throw new ArgumentOutOfRangeException("backend"), }; } public static GRContext CreateGl() { return CreateGl(null, null); } public static GRContext CreateGl(GRGlInterface backendContext) { return CreateGl(backendContext, null); } public static GRContext CreateGl(GRContextOptions options) { return CreateGl(null, options); } public unsafe static GRContext CreateGl(GRGlInterface backendContext, GRContextOptions options) { IntPtr glInterface = backendContext?.Handle ?? IntPtr.Zero; if (options == null) { return GetObject(SkiaApi.gr_direct_context_make_gl(glInterface)); } GRContextOptionsNative gRContextOptionsNative = options.ToNative(); return GetObject(SkiaApi.gr_direct_context_make_gl_with_options(glInterface, &gRContextOptionsNative)); } public static GRContext CreateVulkan(GRVkBackendContext backendContext) { return CreateVulkan(backendContext, null); } public unsafe static GRContext CreateVulkan(GRVkBackendContext backendContext, GRContextOptions options) { if (backendContext == null) { throw new ArgumentNullException("backendContext"); } if (options == null) { return GetObject(SkiaApi.gr_direct_context_make_vulkan(backendContext.ToNative())); } GRContextOptionsNative gRContextOptionsNative = options.ToNative(); return GetObject(SkiaApi.gr_direct_context_make_vulkan_with_options(backendContext.ToNative(), &gRContextOptionsNative)); } public void AbandonContext(bool releaseResources = false) { if (releaseResources) { SkiaApi.gr_direct_context_release_resources_and_abandon_context(Handle); } else { SkiaApi.gr_direct_context_abandon_context(Handle); } } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use GetResourceCacheLimit() instead.")] public void GetResourceCacheLimits(out int maxResources, out long maxResourceBytes) { maxResources = -1; maxResourceBytes = GetResourceCacheLimit(); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use SetResourceCacheLimit(long) instead.")] public void SetResourceCacheLimits(int maxResources, long maxResourceBytes) { SetResourceCacheLimit(maxResourceBytes); } public long GetResourceCacheLimit() { return (long)SkiaApi.gr_direct_context_get_resource_cache_limit(Handle); } public void SetResourceCacheLimit(long maxResourceBytes) { SkiaApi.gr_direct_context_set_resource_cache_limit(Handle, (IntPtr)maxResourceBytes); } public unsafe void GetResourceCacheUsage(out int maxResources, out long maxResourceBytes) { IntPtr intPtr = default(IntPtr); fixed (int* maxResources2 = &maxResources) { SkiaApi.gr_direct_context_get_resource_cache_usage(Handle, maxResources2, &intPtr); } maxResourceBytes = (long)intPtr; } public void ResetContext(GRGlBackendState state) { ResetContext((uint)state); } public void ResetContext(GRBackendState state = GRBackendState.All) { ResetContext((uint)state); } public void ResetContext(uint state) { SkiaApi.gr_direct_context_reset_context(Handle, state); } public void Flush() { Flush(submit: true); } public void Flush(bool submit, bool synchronous = false) { if (submit) { SkiaApi.gr_direct_context_flush_and_submit(Handle, synchronous); } else { SkiaApi.gr_direct_context_flush(Handle); } } public void Submit(bool synchronous = false) { SkiaApi.gr_direct_context_submit(Handle, synchronous); } public new int GetMaxSurfaceSampleCount(SKColorType colorType) { return base.GetMaxSurfaceSampleCount(colorType); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete] public int GetRecommendedSampleCount(GRPixelConfig config, float dpi) { return 0; } public void DumpMemoryStatistics(SKTraceMemoryDump dump) { IntPtr handle = Handle; if (dump == null) { throw new ArgumentNullException("dump"); } SkiaApi.gr_direct_context_dump_memory_statistics(handle, dump.Handle); } public void PurgeResources() { SkiaApi.gr_direct_context_free_gpu_resources(Handle); } public void PurgeUnusedResources(long milliseconds) { SkiaApi.gr_direct_context_perform_deferred_cleanup(Handle, milliseconds); } public void PurgeUnlockedResources(bool scratchResourcesOnly) { SkiaApi.gr_direct_context_purge_unlocked_resources(Handle, scratchResourcesOnly); } public void PurgeUnlockedResources(long bytesToPurge, bool preferScratchResources) { SkiaApi.gr_direct_context_purge_unlocked_resources_bytes(Handle, (IntPtr)bytesToPurge, preferScratchResources); } internal static GRContext GetObject(IntPtr handle, bool owns = true) { return SKObject.GetOrAddObject(handle, owns, (IntPtr h, bool o) => new GRContext(h, o)); } } public class GRContextOptions { public bool AvoidStencilBuffers { get; set; } public int RuntimeProgramCacheSize { get; set; } = 256; public int GlyphCacheTextureMaximumBytes { get; set; } = 8388608; public bool AllowPathMaskCaching { get; set; } = true; public bool DoManualMipmapping { get; set; } public int BufferMapThreshold { get; set; } = -1; internal GRContextOptionsNative ToNative() { return new GRContextOptionsNative { fAllowPathMaskCaching = (AllowPathMaskCaching ? ((byte)1) : ((byte)0)), fAvoidStencilBuffers = (AvoidStencilBuffers ? ((byte)1) : ((byte)0)), fBufferMapThreshold = BufferMapThreshold, fDoManualMipmapping = (DoManualMipmapping ? ((byte)1) : ((byte)0)), fGlyphCacheTextureMaximumBytes = (IntPtr)GlyphCacheTextureMaximumBytes, fRuntimeProgramCacheSize = RuntimeProgramCacheSize }; } } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use GRBackendRenderTarget instead.")] public struct GRBackendRenderTargetDesc : IEquatable<GRBackendRenderTargetDesc> { public int Width { get; set; } public int Height { get; set; } public GRPixelConfig Config { get; set; } public GRSurfaceOrigin Origin { get; set; } public int SampleCount { get; set; } public int StencilBits { get; set; } public IntPtr RenderTargetHandle { get; set; } public readonly SKSizeI Size => new SKSizeI(Width, Height); public readonly SKRectI Rect => new SKRectI(0, 0, Width, Height); public readonly bool Equals(GRBackendRenderTargetDesc obj) { if (Width == obj.Width && Height == obj.Height && Config == obj.Config && Origin == obj.Origin && SampleCount == obj.SampleCount && StencilBits == obj.StencilBits) { return RenderTargetHandle == obj.RenderTargetHandle; } return false; } public override readonly bool Equals(object obj) { if (obj is GRBackendRenderTargetDesc obj2) { return Equals(obj2); } return false; } public static bool operator ==(GRBackendRenderTargetDesc left, GRBackendRenderTargetDesc right) { return left.Equals(right); } public static bool operator !=(GRBackendRenderTargetDesc left, GRBackendRenderTargetDesc right) { return !left.Equals(right); } public override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(Width); hashCode.Add(Height); hashCode.Add(Config); hashCode.Add(Origin); hashCode.Add(SampleCount); hashCode.Add(StencilBits); hashCode.Add(RenderTargetHandle); return hashCode.ToHashCode(); } } [Flags] public enum GRGlBackendState : uint { None = 0u, RenderTarget = 1u, TextureBinding = 2u, View = 4u, Blend = 8u, MSAAEnable = 0x10u, Vertex = 0x20u, Stencil = 0x40u, PixelStore = 0x80u, Program = 0x100u, FixedFunction = 0x200u, Misc = 0x400u, PathRendering = 0x800u, All = 0xFFFFu } [Flags] public enum GRBackendState : uint { None = 0u, All = uint.MaxValue } public struct GRGlFramebufferInfo : IEquatable<GRGlFramebufferInfo> { private uint fFBOID; private uint fFormat; public uint FramebufferObjectId { readonly get { return fFBOID; } set { fFBOID = value; } } public uint Format { readonly get { return fFormat; } set { fFormat = value; } } public GRGlFramebufferInfo(uint fboId) { fFBOID = fboId; fFormat = 0u; } public GRGlFramebufferInfo(uint fboId, uint format) { fFBOID = fboId; fFormat = format; } public readonly bool Equals(GRGlFramebufferInfo obj) { if (fFBOID == obj.fFBOID) { return fFormat == obj.fFormat; } return false; } public override readonly bool Equals(object obj) { if (obj is GRGlFramebufferInfo obj2) { return Equals(obj2); } return false; } public static bool operator ==(GRGlFramebufferInfo left, GRGlFramebufferInfo right) { return left.Equals(right); } public static bool operator !=(GRGlFramebufferInfo left, GRGlFramebufferInfo right) { return !left.Equals(right); } public override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(fFBOID); hashCode.Add(fFormat); return hashCode.ToHashCode(); } } public struct GRGlTextureInfo : IEquatable<GRGlTextureInfo> { private uint fTarget; private uint fID; private uint fFormat; public uint Target { readonly get { return fTarget; } set { fTarget = value; } } public uint Id { readonly get { return fID; } set { fID = value; } } public uint Format { readonly get { return fFormat; } set { fFormat = value; } } public GRGlTextureInfo(uint target, uint id) { fTarget = target; fID = id; fFormat = 0u; } public GRGlTextureInfo(uint target, uint id, uint format) { fTarget = target; fID = id; fFormat = format; } public readonly bool Equals(GRGlTextureInfo obj) { if (fTarget == obj.fTarget && fID == obj.fID) { return fFormat == obj.fFormat; } return false; } public override readonly bool Equals(object obj) { if (obj is GRGlTextureInfo obj2) { return Equals(obj2); } return false; } public static bool operator ==(GRGlTextureInfo left, GRGlTextureInfo right) { return left.Equals(right); } public static bool operator !=(GRGlTextureInfo left, GRGlTextureInfo right) { return !left.Equals(right); } public override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(fTarget); hashCode.Add(fID); hashCode.Add(fFormat); return hashCode.ToHashCode(); } } [EditorBrowsable(EditorBrowsableState.Never)] [Flags] [Obsolete] public enum GRBackendTextureDescFlags { None = 0, RenderTarget = 1 } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use GRBackendTexture instead.")] public struct GRBackendTextureDesc : IEquatable<GRBackendTextureDesc> { public GRBackendTextureDescFlags Flags { get; set; } public GRSurfaceOrigin Origin { get; set; } public int Width { get; set; } public int Height { get; set; } public GRPixelConfig Config { get; set; } public int SampleCount { get; set; } public IntPtr TextureHandle { get; set; } public readonly SKSizeI Size => new SKSizeI(Width, Height); public readonly SKRectI Rect => new SKRectI(0, 0, Width, Height); public readonly bool Equals(GRBackendTextureDesc obj) { if (Flags == obj.Flags && Origin == obj.Origin && Width == obj.Width && Height == obj.Height && Config == obj.Config && SampleCount == obj.SampleCount) { return TextureHandle == obj.TextureHandle; } return false; } public override readonly bool Equals(object obj) { if (obj is GRBackendTextureDesc obj2) { return Equals(obj2); } return false; } public static bool operator ==(GRBackendTextureDesc left, GRBackendTextureDesc right) { return left.Equals(right); } public static bool operator !=(GRBackendTextureDesc left, GRBackendTextureDesc right) { return !left.Equals(right); } public override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(Flags); hashCode.Add(Origin); hashCode.Add(Width); hashCode.Add(Height); hashCode.Add(Config); hashCode.Add(SampleCount); hashCode.Add(TextureHandle); return hashCode.ToHashCode(); } } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use GRBackendTexture instead.")] public struct GRGlBackendTextureDesc : IEquatable<GRGlBackendTextureDesc> { public GRBackendTextureDescFlags Flags { get; set; } public GRSurfaceOrigin Origin { get; set; } public int Width { get; set; } public int Height { get; set; } public GRPixelConfig Config { get; set; } public int SampleCount { get; set; } public GRGlTextureInfo TextureHandle { get; set; } public readonly SKSizeI Size => new SKSizeI(Width, Height); public readonly SKRectI Rect => new SKRectI(0, 0, Width, Height); public readonly bool Equals(GRGlBackendTextureDesc obj) { if (Flags == obj.Flags && Origin == obj.Origin && Width == obj.Width && Height == obj.Height && Config == obj.Config && SampleCount == obj.SampleCount) { return TextureHandle == obj.TextureHandle; } return false; } public override readonly bool Equals(object obj) { if (obj is GRGlBackendTextureDesc obj2) { return Equals(obj2); } return false; } public static bool operator ==(GRGlBackendTextureDesc left, GRGlBackendTextureDesc right) { return left.Equals(right); } public static bool operator !=(GRGlBackendTextureDesc left, GRGlBackendTextureDesc right) { return !left.Equals(right); } public override readonly int GetHashCode() { HashCode hashCode = default(HashCode); hashCode.Add(Flags); hashCode.Add(Origin); hashCode.Add(Width); hashCode.Add(Height); hashCode.Add(Config); hashCode.Add(SampleCount); hashCode.Add(TextureHandle); return hashCode.ToHashCode(); } } internal static class GRGlSizedFormat { internal const uint STENCIL_INDEX = 6401u; internal const uint DEPTH_COMPONENT = 6402u; internal const uint DEPTH_STENCIL = 34041u; internal const uint RED = 6403u; internal const uint RED_INTEGER = 36244u; internal const uint GREEN = 6404u; internal const uint BLUE = 6405u; internal const uint ALPHA = 6406u; internal const uint LUMINANCE = 6409u; internal const uint LUMINANCE_ALPHA = 6410u; internal const uint RG_INTEGER = 33320u; internal const uint RGB = 6407u; internal const uint RGB_INTEGER = 36248u; internal const uint SRGB = 35904u; internal const uint RGBA = 6408u; internal const uint RG = 33319u; internal const uint SRGB_ALPHA = 35906u; internal const uint RGBA_INTEGER = 36249u; internal const uint BGRA = 32993u; internal const uint STENCIL_INDEX4 = 36167u; internal const uint STENCIL_INDEX8 = 36168u; internal const uint STENCIL_INDEX16 = 36169u; internal const uint DEPTH_COMPONENT16 = 33189u; internal const uint DEPTH24_STENCIL8 = 35056u; internal const uint R8 = 33321u; internal const uint R16 = 33322u; internal const uint R16F = 33325u; internal const uint R32F = 33326u; internal const uint R8I = 33329u; internal const uint R8UI = 33330u; internal const uint R16I = 33331u; internal const uint R16UI = 33332u; internal const uint R32I = 33333u; internal const uint R32UI = 33334u; internal const uint LUMINANCE8 = 32832u; internal const uint LUMINANCE16F = 34846u; internal const uint ALPHA8 = 32828u; internal const uint ALPHA16 = 32830u; internal const uint ALPHA16F = 34844u; internal const uint ALPHA32F = 34838u; internal const uint ALPHA8I = 36240u; internal const uint ALPHA8UI = 36222u; internal const uint ALPHA16I = 36234u; internal const uint ALPHA16UI = 36216u; internal const uint ALPHA32I = 36228u; internal const uint ALPHA32UI = 36210u; internal const uint RG8 = 33323u; internal const uint RG16 = 33324u; internal const uint RG16F = 33327u; internal const uint RG8I = 33335u; internal const uint RG8UI = 33336u; internal const uint RG16I = 33337u; internal const uint RG16UI = 33338u; internal const uint RG32I = 33339u; internal const uint RG32UI = 33340u; internal const uint RGB5 = 32848u; internal const uint RGB565 = 36194u; internal const uint RGB8 = 32849u; internal const uint SRGB8 = 35905u; internal const uint RGB8I = 36239u; internal const uint RGB8UI = 36221u; internal const uint RGB16I = 36233u; internal const uint RGB16UI = 36215u; internal const uint RGB32I = 36227u; internal const uint RGB32UI = 36209u; internal const uint RGBA4 = 32854u; internal const uint RGB5_A1 = 32855u; internal const uint RGBA8 = 32856u; internal const uint RGB10_A2 = 32857u; internal const uint SRGB8_ALPHA8 = 35907u; internal const uint RGBA16F = 34842u; internal const uint RGBA32F = 34836u; internal const uint RG32F = 33328u; internal const uint RGBA16 = 32859u; internal const uint RGBA8I = 36238u; internal const uint RGBA8UI = 36220u; internal const uint RGBA16I = 36232u; internal const uint RGBA16UI = 36214u; internal const uint RGBA32I = 36226u; internal const uint RGBA32UI = 36208u; internal const uint BGRA8 = 37793u; internal const uint COMPRESSED_ETC1_RGB8 = 36196u; } public class GRGlInterface : SKObject, ISKReferenceCounted, ISKSkipObjectRegistration { private static class AngleLoader { private static readonly IntPtr libEGL; private static readonly IntPtr libGLESv2; public static bool IsValid { get { if (libEGL != IntPtr.Zero) { return libGLESv2 != IntPtr.Zero; } return false; } } [DllImport("Kernel32.dll", CharSet = CharSet.Ansi, SetLastError = true)] private static extern IntPtr LoadLibrary([MarshalAs(UnmanagedType.LPStr)] string lpFileName); [DllImport("Kernel32.dll", CharSet = CharSet.Ansi, SetLastError = true)] private static extern IntPtr GetProcAddress(IntPtr hModule, [MarshalAs(UnmanagedType.LPStr)] string lpProcName); [DllImport("libEGL.dll")] private static extern IntPtr eglGetProcAddress([MarshalAs(UnmanagedType.LPStr)] string procname); static AngleLoader() { if (PlatformConfiguration.IsWindows) { libEGL = LoadLibrary("libEGL.dll"); libGLESv2 = LoadLibrary("libGLESv2.dll"); } } public static IntPtr GetProc(string name) { if (!PlatformConfiguration.IsWindows) { return IntPtr.Zero; } if (!IsValid) { return IntPtr.Zero; } IntPtr intPtr = GetProcAddress(libGLESv2, name); if (intPtr == IntPtr.Zero) { intPtr = GetProcAddress(libEGL, name); } if (intPtr == IntPtr.Zero) { intPtr = eglGetProcAddress(name); } return intPtr; } } internal GRGlInterface(IntPtr h, bool owns) : base(h, owns) { } protected override void Dispose(bool disposing) { base.Dispose(disposing); } public static GRGlInterface Create() { return CreateGl() ?? CreateAngle(); } private static GRGlInterface CreateGl() { return GetObject(SkiaApi.gr_glinterface_create_native_interface()); } public static GRGlInterface CreateAngle() { if (PlatformConfiguration.IsWindows) { return CreateAngle(AngleLoader.GetProc); } return null; } public unsafe static GRGlInterface Create(GRGlGetProcedureAddressDelegate get) { GCHandle gch; IntPtr contextPtr; GRGlGetProcProxyDelegate get2 = DelegateProxies.Create(get, DelegateProxies.GRGlGetProcDelegateProxy, out gch, out contextPtr); try { return GetObject(SkiaApi.gr_glinterface_assemble_interface((void*)contextPtr, get2)); } finally { gch.Free(); } } public static GRGlInterface CreateAngle(GRGlGetProcedureAddressDelegate get) { return CreateGles(get); } public unsafe static GRGlInterface CreateOpenGl(GRGlGetProcedureAddressDelegate get) { GCHandle gch; IntPtr contextPtr; GRGlGetProcProxyDelegate get2 = DelegateProxies.Create(get, DelegateProxies.GRGlGetProcDelegateProxy, out gch, out contextPtr); try { return GetObject(SkiaApi.gr_glinterface_assemble_gl_interface((void*)contextPtr, get2)); } finally { gch.Free(); } } public unsafe static GRGlInterface CreateGles(GRGlGetProcedureAddressDelegate get) { GCHandle gch; IntPtr contextPtr; GRGlGetProcProxyDelegate get2 = DelegateProxies.Create(get, DelegateProxies.GRGlGetProcDelegateProxy, out gch, out contextPtr); try { return GetObject(SkiaApi.gr_glinterface_assemble_gles_interface((void*)contextPtr, get2)); } finally { gch.Free(); } } public unsafe static GRGlInterface CreateWebGl(GRGlGetProcedureAddressDelegate get) { GCHandle gch; IntPtr contextPtr; GRGlGetProcProxyDelegate get2 = DelegateProxies.Create(get, DelegateProxies.GRGlGetProcDelegateProxy, out gch, out contextPtr); try { return GetObject(SkiaApi.gr_glinterface_assemble_webgl_interface((void*)contextPtr, get2)); } finally { gch.Free(); } } public static GRGlInterface CreateEvas(IntPtr evas) { return null; } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use Create() instead.")] public static GRGlInterface CreateDefaultInterface() { return Create(); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use Create() instead.")] public static GRGlInterface CreateNativeGlInterface() { return CreateGl(); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use Create() instead.")] public static GRGlInterface CreateNativeAngleInterface() { return CreateAngle(); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use CreateEvas(IntPtr) instead.")] public static GRGlInterface CreateNativeEvasInterface(IntPtr evas) { return CreateEvas(evas); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use Create(GRGlGetProcedureAddressDelegate) instead.")] public static GRGlInterface AssembleInterface(GRGlGetProcDelegate get) { return Create((string name) => get(null, name)); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use Create(GRGlGetProcedureAddressDelegate) instead.")] public static GRGlInterface AssembleInterface(object context, GRGlGetProcDelegate get) { return Create((string name) => get(context, name)); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use CreateAngle(GRGlGetProcedureAddressDelegate) instead.")] public static GRGlInterface AssembleAngleInterface(GRGlGetProcDelegate get) { return CreateAngle((string name) => get(null, name)); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use CreateAngle(GRGlGetProcedureAddressDelegate) instead.")] public static GRGlInterface AssembleAngleInterface(object context, GRGlGetProcDelegate get) { return CreateAngle((string name) => get(context, name)); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use CreateOpenGl(GRGlGetProcedureAddressDelegate) instead.")] public static GRGlInterface AssembleGlInterface(GRGlGetProcDelegate get) { return CreateOpenGl((string name) => get(null, name)); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use CreateOpenGl(GRGlGetProcedureAddressDelegate) instead.")] public static GRGlInterface AssembleGlInterface(object context, GRGlGetProcDelegate get) { return CreateOpenGl((string name) => get(context, name)); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use CreateGles(GRGlGetProcedureAddressDelegate) instead.")] public static GRGlInterface AssembleGlesInterface(GRGlGetProcDelegate get) { return CreateGles((string name) => get(null, name)); } [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Use CreateGles(GRGlGetProcedureAddressDelegate) instead.")] public static GRGlInterface AssembleGlesInterface(object context, GRGlGetProcDelegate get) { return CreateGles((string name) => get(context, name)); } public bool Validate() { return SkiaApi.gr_glinterface_validate(Handle); } public bool HasExtension(string extension) { return SkiaApi.gr_glinterface_has_extension(Handle, extension); } internal static GRGlInterface GetObject(IntPtr handle) { if (!(handle == IntPtr.Zero)) { return new GRGlInterface(handle, owns: true); } return null; } } public class GRRecordingContext : SKObject, ISKReferenceCounted { public GRBackend Backend => SkiaApi.gr_recording_context_get_backend(Handle).FromNative(); internal GRRecordingContext(IntPtr h, bool owns) : base(h, owns) { } public int GetMaxSurfaceSampleCount(SKColorType colorType) { return SkiaApi.gr_recording_context_get_max_surface_sample_count_for_color_type(Handle, colorType.ToNative()); } internal static GRRecordingContext GetObject(IntPtr handle, bool owns = true, bool unrefExisting = true) { return SKObject.GetOrAddObject(handle, owns, unrefExisting, (IntPtr h, bool o) => new GRRecordingContext(h, o)); } } public class GRVkBackendContext : IDisposable { private GRVkGetProcedureAddressDelegate getProc; private GRVkGetProcProxyDelegate getProcProxy; private GCHandle getProcHandle; private unsafe void* getProcContext; public IntPtr VkInstance { get; set; } public IntPtr VkPhysicalDevice { get; set; } public IntPtr VkDevice { get; set; } public IntPtr VkQueue { get; set; } public uint GraphicsQueueIndex { get; set; } public uint MaxAPIVersion { get; set; } public GRVkExtensions Extensions { get; set; } public IntPtr VkPhysicalDeviceFeatures { get; set; } public IntPtr VkPhysicalDeviceFeatures2 { get; set; } public unsafe GRVkGetProcedureAddressDelegate GetProcedureAddress { get { return getProc; } set { getProc = value; if (getProcHandle.IsAllocated) { getProcHandle.Free(); } getProcProxy = null; getProcHandle = default(GCHandle); getProcContext = null; if (value != null) { getProcProxy = DelegateProxies.Create(value, DelegateProxies.GRVkGetProcDelegateProxy, out var gch, out var contextPtr); getProcHandle = gch; getProcContext = (void*)contextPtr; } } } public bool ProtectedContext { get; set; } protected virtual void Dispose(bool disposing) { if (disposing && getProcHandle.IsAllocated) { getProcHandle.Free(); getProcHandle = default(GCHandle); } } public void Dispose() { Dispose(disposing: true); GC.SuppressFinalize(this); } internal unsafe GRVkBackendContextNative ToNative() { return new GRVkBackendContextNative { fInstance = VkInstance, fDevice = VkDevice, fPhysicalDevice = VkPhysicalDevice, fQueue = VkQueue, fGraphicsQueueIndex = GraphicsQueueIndex, fMaxAPIVersion = MaxAPIVersion, fVkExtensions = (Extensions?.Handle ?? IntPtr.Zero), fDeviceFeatures = VkPhysicalDeviceFeatures, fDeviceFeatures2 = VkPhysicalDeviceFeatures2, fGetProcUserData = getProcContext, fGetProc = getProcProxy, fProtectedContext = (ProtectedContext ? ((byte)1) : ((byte)0)) }; } } public class GRVkExtensions : SKObject, ISKSkipObjectRegistration { internal GRVkExtensions(IntPtr h, bool owns) : base(h, owns) { } private GRVkExtensions() : this(SkiaApi.gr_vk_extensions_new(), owns: true) { } protected override void DisposeNative() { SkiaApi.gr_vk_extensions_delete(Handle); } public void HasExtension(string extension, int minVersion) { SkiaApi.gr_vk_extensions_has_extension(Handle, extension, (uint)minVersion); } public void Initialize(GRVkGetProcedureAddressDelegate getProc, IntPtr vkInstance, IntPtr vkPhysicalDevice) { Initialize(getProc, vkInstance, vkPhysicalDevice, null, null); } public unsafe void Initialize(GRVkGetProcedureAddressDelegate getProc, IntPtr vkInstance, IntPtr vkPhysicalDevice, string[] instanceExtensions, string[] deviceExtensions) { GCHandle gch; IntPtr contextPtr; GRVkGetProcProxyDelegate getProc2 = DelegateProxies.Create(getProc, DelegateProxies.GRVkGetProcDelegateProxy, out gch, out contextPtr); try { SkiaApi.gr_vk_extensions_init(Handle, getProc2, (void*)contextPtr, vkInstance, vkPhysicalDevice, (instanceExtensions != null) ? ((uint)instanceExtensions.Length) : 0u, instanceExtensions, (deviceExtensions != null) ? ((uint)deviceExtensions.Length) : 0u, deviceExtensions); } finally { gch.Free(); } } public static GRVkExtensions Create(GRVkGetProcedureAddressDelegate getProc, IntPtr vkInstance, IntPtr vkPhysicalDevice, string[] instanceExtensions, string[] deviceExtensions) { GRVkExtensions gRV
BepInEx/plugins/Broheim-SileroTTS/System.Net.Requests.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Net; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Net.Requests")] [assembly: AssemblyDescription("System.Net.Requests")] [assembly: AssemblyDefaultAlias("System.Net.Requests")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(HttpRequestHeader))] [assembly: TypeForwardedTo(typeof(HttpWebRequest))] [assembly: TypeForwardedTo(typeof(HttpWebResponse))] [assembly: TypeForwardedTo(typeof(IWebRequestCreate))] [assembly: TypeForwardedTo(typeof(ProtocolViolationException))] [assembly: TypeForwardedTo(typeof(WebException))] [assembly: TypeForwardedTo(typeof(WebExceptionStatus))] [assembly: TypeForwardedTo(typeof(WebHeaderCollection))] [assembly: TypeForwardedTo(typeof(WebRequest))] [assembly: TypeForwardedTo(typeof(WebResponse))]
BepInEx/plugins/Broheim-SileroTTS/System.Resources.ResourceManager.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Resources.ResourceManager")] [assembly: AssemblyDescription("System.Resources.ResourceManager")] [assembly: AssemblyDefaultAlias("System.Resources.ResourceManager")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(MissingManifestResourceException))] [assembly: TypeForwardedTo(typeof(NeutralResourcesLanguageAttribute))] [assembly: TypeForwardedTo(typeof(ResourceManager))] [assembly: TypeForwardedTo(typeof(SatelliteContractVersionAttribute))]
BepInEx/plugins/Broheim-SileroTTS/System.Net.NameResolution.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Net; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Net.NameResolution")] [assembly: AssemblyDescription("System.Net.NameResolution")] [assembly: AssemblyDefaultAlias("System.Net.NameResolution")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(Dns))] [assembly: TypeForwardedTo(typeof(IPHostEntry))]
BepInEx/plugins/Broheim-SileroTTS/System.Xml.XmlDocument.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Xml; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Xml.XmlDocument")] [assembly: AssemblyDescription("System.Xml.XmlDocument")] [assembly: AssemblyDefaultAlias("System.Xml.XmlDocument")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.3.0")] [assembly: TypeForwardedTo(typeof(XmlAttribute))] [assembly: TypeForwardedTo(typeof(XmlAttributeCollection))] [assembly: TypeForwardedTo(typeof(XmlCDataSection))] [assembly: TypeForwardedTo(typeof(XmlCharacterData))] [assembly: TypeForwardedTo(typeof(XmlComment))] [assembly: TypeForwardedTo(typeof(XmlDeclaration))] [assembly: TypeForwardedTo(typeof(XmlDocument))] [assembly: TypeForwardedTo(typeof(XmlDocumentFragment))] [assembly: TypeForwardedTo(typeof(XmlElement))] [assembly: TypeForwardedTo(typeof(XmlImplementation))] [assembly: TypeForwardedTo(typeof(XmlLinkedNode))] [assembly: TypeForwardedTo(typeof(XmlNamedNodeMap))] [assembly: TypeForwardedTo(typeof(XmlNode))] [assembly: TypeForwardedTo(typeof(XmlNodeChangedAction))] [assembly: TypeForwardedTo(typeof(XmlNodeChangedEventArgs))] [assembly: TypeForwardedTo(typeof(XmlNodeChangedEventHandler))] [assembly: TypeForwardedTo(typeof(XmlNodeList))] [assembly: TypeForwardedTo(typeof(XmlProcessingInstruction))] [assembly: TypeForwardedTo(typeof(XmlSignificantWhitespace))] [assembly: TypeForwardedTo(typeof(XmlText))] [assembly: TypeForwardedTo(typeof(XmlWhitespace))]
BepInEx/plugins/Broheim-SileroTTS/System.Net.Security.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Net.Security; using System.Reflection; using System.Runtime.CompilerServices; using System.Security.Authentication; using System.Security.Authentication.ExtendedProtection; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Net.Security")] [assembly: AssemblyDescription("System.Net.Security")] [assembly: AssemblyDefaultAlias("System.Net.Security")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(AuthenticatedStream))] [assembly: TypeForwardedTo(typeof(EncryptionPolicy))] [assembly: TypeForwardedTo(typeof(LocalCertificateSelectionCallback))] [assembly: TypeForwardedTo(typeof(NegotiateStream))] [assembly: TypeForwardedTo(typeof(ProtectionLevel))] [assembly: TypeForwardedTo(typeof(RemoteCertificateValidationCallback))] [assembly: TypeForwardedTo(typeof(SslStream))] [assembly: TypeForwardedTo(typeof(AuthenticationException))] [assembly: TypeForwardedTo(typeof(ExtendedProtectionPolicy))] [assembly: TypeForwardedTo(typeof(PolicyEnforcement))] [assembly: TypeForwardedTo(typeof(ProtectionScenario))] [assembly: TypeForwardedTo(typeof(ServiceNameCollection))] [assembly: TypeForwardedTo(typeof(InvalidCredentialException))]
BepInEx/plugins/Broheim-SileroTTS/System.Security.Principal.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Security.Principal; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Security.Principal")] [assembly: AssemblyDescription("System.Security.Principal")] [assembly: AssemblyDefaultAlias("System.Security.Principal")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(IIdentity))] [assembly: TypeForwardedTo(typeof(IPrincipal))] [assembly: TypeForwardedTo(typeof(TokenImpersonationLevel))]
BepInEx/plugins/Broheim-SileroTTS/System.Memory.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Buffers; using System.Buffers.Binary; using System.Buffers.Text; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Numerics; using System.Numerics.Hashing; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; using System.Text; using FxResources.System.Memory; using Microsoft.CodeAnalysis; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: NeutralResourcesLanguage("en-US")] [assembly: AssemblyTitle("System.Memory")] [assembly: AssemblyDescription("System.Memory")] [assembly: AssemblyDefaultAlias("System.Memory")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] [assembly: AssemblyFileVersion("4.6.31308.01")] [assembly: AssemblyInformationalVersion("4.6.31308.01 @BuiltBy: cloudtest-841353dfc000000 @Branch: release/2.1-MSRC @SrcCode: https://github.com/dotnet/corefx/tree/32b491939fbd125f304031c35038b1e14b4e3958")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata(".NETFrameworkAssembly", "")] [assembly: AssemblyMetadata("Serviceable", "True")] [assembly: AssemblyMetadata("PreferInbox", "True")] [assembly: DefaultDllImportSearchPaths(DllImportSearchPath.System32 | DllImportSearchPath.AssemblyDirectory)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("4.0.1.2")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class IsReadOnlyAttribute : Attribute { } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class IsByRefLikeAttribute : Attribute { } } namespace FxResources.System.Memory { internal static class SR { } } namespace System { public readonly struct SequencePosition : IEquatable<SequencePosition> { private readonly object _object; private readonly int _integer; public SequencePosition(object @object, int integer) { _object = @object; _integer = integer; } [EditorBrowsable(EditorBrowsableState.Never)] public object GetObject() { return _object; } [EditorBrowsable(EditorBrowsableState.Never)] public int GetInteger() { return _integer; } public bool Equals(SequencePosition other) { if (_integer == other._integer) { return object.Equals(_object, other._object); } return false; } [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) { if (obj is SequencePosition other) { return Equals(other); } return false; } [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() { return HashHelpers.Combine(_object?.GetHashCode() ?? 0, _integer); } } internal static class ThrowHelper { internal static void ThrowArgumentNullException(System.ExceptionArgument argument) { throw CreateArgumentNullException(argument); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateArgumentNullException(System.ExceptionArgument argument) { return new ArgumentNullException(argument.ToString()); } internal static void ThrowArrayTypeMismatchException() { throw CreateArrayTypeMismatchException(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateArrayTypeMismatchException() { return new ArrayTypeMismatchException(); } internal static void ThrowArgumentException_InvalidTypeWithPointersNotSupported(Type type) { throw CreateArgumentException_InvalidTypeWithPointersNotSupported(type); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateArgumentException_InvalidTypeWithPointersNotSupported(Type type) { return new ArgumentException(System.SR.Format(System.SR.Argument_InvalidTypeWithPointersNotSupported, type)); } internal static void ThrowArgumentException_DestinationTooShort() { throw CreateArgumentException_DestinationTooShort(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateArgumentException_DestinationTooShort() { return new ArgumentException(System.SR.Argument_DestinationTooShort); } internal static void ThrowIndexOutOfRangeException() { throw CreateIndexOutOfRangeException(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateIndexOutOfRangeException() { return new IndexOutOfRangeException(); } internal static void ThrowArgumentOutOfRangeException() { throw CreateArgumentOutOfRangeException(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateArgumentOutOfRangeException() { return new ArgumentOutOfRangeException(); } internal static void ThrowArgumentOutOfRangeException(System.ExceptionArgument argument) { throw CreateArgumentOutOfRangeException(argument); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateArgumentOutOfRangeException(System.ExceptionArgument argument) { return new ArgumentOutOfRangeException(argument.ToString()); } internal static void ThrowArgumentOutOfRangeException_PrecisionTooLarge() { throw CreateArgumentOutOfRangeException_PrecisionTooLarge(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateArgumentOutOfRangeException_PrecisionTooLarge() { return new ArgumentOutOfRangeException("precision", System.SR.Format(System.SR.Argument_PrecisionTooLarge, (byte)99)); } internal static void ThrowArgumentOutOfRangeException_SymbolDoesNotFit() { throw CreateArgumentOutOfRangeException_SymbolDoesNotFit(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateArgumentOutOfRangeException_SymbolDoesNotFit() { return new ArgumentOutOfRangeException("symbol", System.SR.Argument_BadFormatSpecifier); } internal static void ThrowInvalidOperationException() { throw CreateInvalidOperationException(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateInvalidOperationException() { return new InvalidOperationException(); } internal static void ThrowInvalidOperationException_OutstandingReferences() { throw CreateInvalidOperationException_OutstandingReferences(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateInvalidOperationException_OutstandingReferences() { return new InvalidOperationException(System.SR.OutstandingReferences); } internal static void ThrowInvalidOperationException_UnexpectedSegmentType() { throw CreateInvalidOperationException_UnexpectedSegmentType(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateInvalidOperationException_UnexpectedSegmentType() { return new InvalidOperationException(System.SR.UnexpectedSegmentType); } internal static void ThrowInvalidOperationException_EndPositionNotReached() { throw CreateInvalidOperationException_EndPositionNotReached(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateInvalidOperationException_EndPositionNotReached() { return new InvalidOperationException(System.SR.EndPositionNotReached); } internal static void ThrowArgumentOutOfRangeException_PositionOutOfRange() { throw CreateArgumentOutOfRangeException_PositionOutOfRange(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateArgumentOutOfRangeException_PositionOutOfRange() { return new ArgumentOutOfRangeException("position"); } internal static void ThrowArgumentOutOfRangeException_OffsetOutOfRange() { throw CreateArgumentOutOfRangeException_OffsetOutOfRange(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateArgumentOutOfRangeException_OffsetOutOfRange() { return new ArgumentOutOfRangeException("offset"); } internal static void ThrowObjectDisposedException_ArrayMemoryPoolBuffer() { throw CreateObjectDisposedException_ArrayMemoryPoolBuffer(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateObjectDisposedException_ArrayMemoryPoolBuffer() { return new ObjectDisposedException("ArrayMemoryPoolBuffer"); } internal static void ThrowFormatException_BadFormatSpecifier() { throw CreateFormatException_BadFormatSpecifier(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateFormatException_BadFormatSpecifier() { return new FormatException(System.SR.Argument_BadFormatSpecifier); } internal static void ThrowArgumentException_OverlapAlignmentMismatch() { throw CreateArgumentException_OverlapAlignmentMismatch(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateArgumentException_OverlapAlignmentMismatch() { return new ArgumentException(System.SR.Argument_OverlapAlignmentMismatch); } internal static void ThrowNotSupportedException() { throw CreateThrowNotSupportedException(); } [MethodImpl(MethodImplOptions.NoInlining)] private static Exception CreateThrowNotSupportedException() { return new NotSupportedException(); } public static bool TryFormatThrowFormatException(out int bytesWritten) { bytesWritten = 0; ThrowFormatException_BadFormatSpecifier(); return false; } public static bool TryParseThrowFormatException<T>(out T value, out int bytesConsumed) { value = default(T); bytesConsumed = 0; ThrowFormatException_BadFormatSpecifier(); return false; } public static void ThrowArgumentValidationException<T>(ReadOnlySequenceSegment<T> startSegment, int startIndex, ReadOnlySequenceSegment<T> endSegment) { throw CreateArgumentValidationException(startSegment, startIndex, endSegment); } private static Exception CreateArgumentValidationException<T>(ReadOnlySequenceSegment<T> startSegment, int startIndex, ReadOnlySequenceSegment<T> endSegment) { if (startSegment == null) { return CreateArgumentNullException(System.ExceptionArgument.startSegment); } if (endSegment == null) { return CreateArgumentNullException(System.ExceptionArgument.endSegment); } if (startSegment != endSegment && startSegment.RunningIndex > endSegment.RunningIndex) { return CreateArgumentOutOfRangeException(System.ExceptionArgument.endSegment); } if ((uint)startSegment.Memory.Length < (uint)startIndex) { return CreateArgumentOutOfRangeException(System.ExceptionArgument.startIndex); } return CreateArgumentOutOfRangeException(System.ExceptionArgument.endIndex); } public static void ThrowArgumentValidationException(Array array, int start) { throw CreateArgumentValidationException(array, start); } private static Exception CreateArgumentValidationException(Array array, int start) { if (array == null) { return CreateArgumentNullException(System.ExceptionArgument.array); } if ((uint)start > (uint)array.Length) { return CreateArgumentOutOfRangeException(System.ExceptionArgument.start); } return CreateArgumentOutOfRangeException(System.ExceptionArgument.length); } public static void ThrowStartOrEndArgumentValidationException(long start) { throw CreateStartOrEndArgumentValidationException(start); } private static Exception CreateStartOrEndArgumentValidationException(long start) { if (start < 0) { return CreateArgumentOutOfRangeException(System.ExceptionArgument.start); } return CreateArgumentOutOfRangeException(System.ExceptionArgument.length); } } internal enum ExceptionArgument { length, start, minimumBufferSize, elementIndex, comparable, comparer, destination, offset, startSegment, endSegment, startIndex, endIndex, array, culture, manager } internal static class DecimalDecCalc { private static uint D32DivMod1E9(uint hi32, ref uint lo32) { ulong num = ((ulong)hi32 << 32) | lo32; lo32 = (uint)(num / 1000000000); return (uint)(num % 1000000000); } internal static uint DecDivMod1E9(ref MutableDecimal value) { return D32DivMod1E9(D32DivMod1E9(D32DivMod1E9(0u, ref value.High), ref value.Mid), ref value.Low); } internal static void DecAddInt32(ref MutableDecimal value, uint i) { if (D32AddCarry(ref value.Low, i) && D32AddCarry(ref value.Mid, 1u)) { D32AddCarry(ref value.High, 1u); } } private static bool D32AddCarry(ref uint value, uint i) { uint num = value; uint num2 = (value = num + i); if (num2 >= num) { return num2 < i; } return true; } internal static void DecMul10(ref MutableDecimal value) { MutableDecimal d = value; DecShiftLeft(ref value); DecShiftLeft(ref value); DecAdd(ref value, d); DecShiftLeft(ref value); } private static void DecShiftLeft(ref MutableDecimal value) { uint num = (((value.Low & 0x80000000u) != 0) ? 1u : 0u); uint num2 = (((value.Mid & 0x80000000u) != 0) ? 1u : 0u); value.Low <<= 1; value.Mid = (value.Mid << 1) | num; value.High = (value.High << 1) | num2; } private static void DecAdd(ref MutableDecimal value, MutableDecimal d) { if (D32AddCarry(ref value.Low, d.Low) && D32AddCarry(ref value.Mid, 1u)) { D32AddCarry(ref value.High, 1u); } if (D32AddCarry(ref value.Mid, d.Mid)) { D32AddCarry(ref value.High, 1u); } D32AddCarry(ref value.High, d.High); } } internal static class Number { private static class DoubleHelper { public unsafe static uint Exponent(double d) { return (*(uint*)((byte*)(&d) + 4) >> 20) & 0x7FFu; } public unsafe static ulong Mantissa(double d) { return *(uint*)(&d) | ((ulong)(uint)(*(int*)((byte*)(&d) + 4) & 0xFFFFF) << 32); } public unsafe static bool Sign(double d) { return *(uint*)((byte*)(&d) + 4) >> 31 != 0; } } internal const int DECIMAL_PRECISION = 29; private static readonly ulong[] s_rgval64Power10 = new ulong[30] { 11529215046068469760uL, 14411518807585587200uL, 18014398509481984000uL, 11258999068426240000uL, 14073748835532800000uL, 17592186044416000000uL, 10995116277760000000uL, 13743895347200000000uL, 17179869184000000000uL, 10737418240000000000uL, 13421772800000000000uL, 16777216000000000000uL, 10485760000000000000uL, 13107200000000000000uL, 16384000000000000000uL, 14757395258967641293uL, 11805916207174113035uL, 9444732965739290428uL, 15111572745182864686uL, 12089258196146291749uL, 9671406556917033399uL, 15474250491067253438uL, 12379400392853802751uL, 9903520314283042201uL, 15845632502852867522uL, 12676506002282294018uL, 10141204801825835215uL, 16225927682921336344uL, 12980742146337069075uL, 10384593717069655260uL }; private static readonly sbyte[] s_rgexp64Power10 = new sbyte[15] { 4, 7, 10, 14, 17, 20, 24, 27, 30, 34, 37, 40, 44, 47, 50 }; private static readonly ulong[] s_rgval64Power10By16 = new ulong[42] { 10240000000000000000uL, 11368683772161602974uL, 12621774483536188886uL, 14012984643248170708uL, 15557538194652854266uL, 17272337110188889248uL, 9588073174409622172uL, 10644899600020376798uL, 11818212630765741798uL, 13120851772591970216uL, 14567071740625403792uL, 16172698447808779622uL, 17955302187076837696uL, 9967194951097567532uL, 11065809325636130658uL, 12285516299433008778uL, 13639663065038175358uL, 15143067982934716296uL, 16812182738118149112uL, 9332636185032188787uL, 10361307573072618722uL, 16615349947311448416uL, 14965776766268445891uL, 13479973333575319909uL, 12141680576410806707uL, 10936253623915059637uL, 9850501549098619819uL, 17745086042373215136uL, 15983352577617880260uL, 14396524142538228461uL, 12967236152753103031uL, 11679847981112819795uL, 10520271803096747049uL, 9475818434452569218uL, 17070116948172427008uL, 15375394465392026135uL, 13848924157002783096uL, 12474001934591998882uL, 11235582092889474480uL, 10120112665365530972uL, 18230774251475056952uL, 16420821625123739930uL }; private static readonly short[] s_rgexp64Power10By16 = new short[21] { 54, 107, 160, 213, 266, 319, 373, 426, 479, 532, 585, 638, 691, 745, 798, 851, 904, 957, 1010, 1064, 1117 }; public static void RoundNumber(ref NumberBuffer number, int pos) { Span<byte> digits = number.Digits; int i; for (i = 0; i < pos && digits[i] != 0; i++) { } if (i == pos && digits[i] >= 53) { while (i > 0 && digits[i - 1] == 57) { i--; } if (i > 0) { digits[i - 1]++; } else { number.Scale++; digits[0] = 49; i = 1; } } else { while (i > 0 && digits[i - 1] == 48) { i--; } } if (i == 0) { number.Scale = 0; number.IsNegative = false; } digits[i] = 0; } internal static bool NumberBufferToDouble(ref NumberBuffer number, out double value) { double num = NumberToDouble(ref number); uint num2 = DoubleHelper.Exponent(num); ulong num3 = DoubleHelper.Mantissa(num); switch (num2) { case 2047u: value = 0.0; return false; case 0u: if (num3 == 0L) { num = 0.0; } break; } value = num; return true; } public unsafe static bool NumberBufferToDecimal(ref NumberBuffer number, ref decimal value) { MutableDecimal source = default(MutableDecimal); byte* ptr = number.UnsafeDigits; int num = number.Scale; if (*ptr == 0) { if (num > 0) { num = 0; } } else { if (num > 29) { return false; } while ((num > 0 || (*ptr != 0 && num > -28)) && (source.High < 429496729 || (source.High == 429496729 && (source.Mid < 2576980377u || (source.Mid == 2576980377u && (source.Low < 2576980377u || (source.Low == 2576980377u && *ptr <= 53))))))) { DecimalDecCalc.DecMul10(ref source); if (*ptr != 0) { DecimalDecCalc.DecAddInt32(ref source, (uint)(*(ptr++) - 48)); } num--; } if (*(ptr++) >= 53) { bool flag = true; if (*(ptr - 1) == 53 && *(ptr - 2) % 2 == 0) { int num2 = 20; while (*ptr == 48 && num2 != 0) { ptr++; num2--; } if (*ptr == 0 || num2 == 0) { flag = false; } } if (flag) { DecimalDecCalc.DecAddInt32(ref source, 1u); if ((source.High | source.Mid | source.Low) == 0) { source.High = 429496729u; source.Mid = 2576980377u; source.Low = 2576980378u; num++; } } } } if (num > 0) { return false; } if (num <= -29) { source.High = 0u; source.Low = 0u; source.Mid = 0u; source.Scale = 28; } else { source.Scale = -num; } source.IsNegative = number.IsNegative; value = Unsafe.As<MutableDecimal, decimal>(ref source); return true; } public static void DecimalToNumber(decimal value, ref NumberBuffer number) { ref MutableDecimal reference = ref Unsafe.As<decimal, MutableDecimal>(ref value); Span<byte> digits = number.Digits; number.IsNegative = reference.IsNegative; int num = 29; while ((reference.Mid != 0) | (reference.High != 0)) { uint num2 = DecimalDecCalc.DecDivMod1E9(ref reference); for (int i = 0; i < 9; i++) { digits[--num] = (byte)(num2 % 10 + 48); num2 /= 10; } } for (uint num3 = reference.Low; num3 != 0; num3 /= 10) { digits[--num] = (byte)(num3 % 10 + 48); } int num4 = 29 - num; number.Scale = num4 - reference.Scale; Span<byte> digits2 = number.Digits; int index = 0; while (--num4 >= 0) { digits2[index++] = digits[num++]; } digits2[index] = 0; } private static uint DigitsToInt(ReadOnlySpan<byte> digits, int count) { uint value; int bytesConsumed; bool flag = Utf8Parser.TryParse(digits.Slice(0, count), out value, out bytesConsumed, 'D'); return value; } private static ulong Mul32x32To64(uint a, uint b) { return (ulong)a * (ulong)b; } private static ulong Mul64Lossy(ulong a, ulong b, ref int pexp) { ulong num = Mul32x32To64((uint)(a >> 32), (uint)(b >> 32)) + (Mul32x32To64((uint)(a >> 32), (uint)b) >> 32) + (Mul32x32To64((uint)a, (uint)(b >> 32)) >> 32); if ((num & 0x8000000000000000uL) == 0L) { num <<= 1; pexp--; } return num; } private static int abs(int value) { if (value < 0) { return -value; } return value; } private unsafe static double NumberToDouble(ref NumberBuffer number) { ReadOnlySpan<byte> digits = number.Digits; int i = 0; int numDigits = number.NumDigits; int num = numDigits; for (; digits[i] == 48; i++) { num--; } if (num == 0) { return 0.0; } int num2 = Math.Min(num, 9); num -= num2; ulong num3 = DigitsToInt(digits, num2); if (num > 0) { num2 = Math.Min(num, 9); num -= num2; uint b = (uint)(s_rgval64Power10[num2 - 1] >> 64 - s_rgexp64Power10[num2 - 1]); num3 = Mul32x32To64((uint)num3, b) + DigitsToInt(digits.Slice(9), num2); } int num4 = number.Scale - (numDigits - num); int num5 = abs(num4); if (num5 >= 352) { ulong num6 = ((num4 > 0) ? 9218868437227405312uL : 0); if (number.IsNegative) { num6 |= 0x8000000000000000uL; } return *(double*)(&num6); } int pexp = 64; if ((num3 & 0xFFFFFFFF00000000uL) == 0L) { num3 <<= 32; pexp -= 32; } if ((num3 & 0xFFFF000000000000uL) == 0L) { num3 <<= 16; pexp -= 16; } if ((num3 & 0xFF00000000000000uL) == 0L) { num3 <<= 8; pexp -= 8; } if ((num3 & 0xF000000000000000uL) == 0L) { num3 <<= 4; pexp -= 4; } if ((num3 & 0xC000000000000000uL) == 0L) { num3 <<= 2; pexp -= 2; } if ((num3 & 0x8000000000000000uL) == 0L) { num3 <<= 1; pexp--; } int num7 = num5 & 0xF; if (num7 != 0) { int num8 = s_rgexp64Power10[num7 - 1]; pexp += ((num4 < 0) ? (-num8 + 1) : num8); ulong b2 = s_rgval64Power10[num7 + ((num4 < 0) ? 15 : 0) - 1]; num3 = Mul64Lossy(num3, b2, ref pexp); } num7 = num5 >> 4; if (num7 != 0) { int num9 = s_rgexp64Power10By16[num7 - 1]; pexp += ((num4 < 0) ? (-num9 + 1) : num9); ulong b3 = s_rgval64Power10By16[num7 + ((num4 < 0) ? 21 : 0) - 1]; num3 = Mul64Lossy(num3, b3, ref pexp); } if (((uint)(int)num3 & 0x400u) != 0) { ulong num10 = num3 + 1023 + (ulong)(((int)num3 >> 11) & 1); if (num10 < num3) { num10 = (num10 >> 1) | 0x8000000000000000uL; pexp++; } num3 = num10; } pexp += 1022; num3 = ((pexp <= 0) ? ((pexp == -52 && num3 >= 9223372036854775896uL) ? 1 : ((pexp > -52) ? (num3 >> -pexp + 11 + 1) : 0)) : ((pexp < 2047) ? ((ulong)((long)pexp << 52) + ((num3 >> 11) & 0xFFFFFFFFFFFFFL)) : 9218868437227405312uL)); if (number.IsNegative) { num3 |= 0x8000000000000000uL; } return *(double*)(&num3); } } internal ref struct NumberBuffer { public int Scale; public bool IsNegative; public const int BufferSize = 51; private byte _b0; private byte _b1; private byte _b2; private byte _b3; private byte _b4; private byte _b5; private byte _b6; private byte _b7; private byte _b8; private byte _b9; private byte _b10; private byte _b11; private byte _b12; private byte _b13; private byte _b14; private byte _b15; private byte _b16; private byte _b17; private byte _b18; private byte _b19; private byte _b20; private byte _b21; private byte _b22; private byte _b23; private byte _b24; private byte _b25; private byte _b26; private byte _b27; private byte _b28; private byte _b29; private byte _b30; private byte _b31; private byte _b32; private byte _b33; private byte _b34; private byte _b35; private byte _b36; private byte _b37; private byte _b38; private byte _b39; private byte _b40; private byte _b41; private byte _b42; private byte _b43; private byte _b44; private byte _b45; private byte _b46; private byte _b47; private byte _b48; private byte _b49; private byte _b50; public unsafe Span<byte> Digits => new Span<byte>(Unsafe.AsPointer(ref _b0), 51); public unsafe byte* UnsafeDigits => (byte*)Unsafe.AsPointer(ref _b0); public int NumDigits => Digits.IndexOf<byte>(0); [Conditional("DEBUG")] public void CheckConsistency() { } public override string ToString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append('['); stringBuilder.Append('"'); Span<byte> digits = Digits; for (int i = 0; i < 51; i++) { byte b = digits[i]; if (b == 0) { break; } stringBuilder.Append((char)b); } stringBuilder.Append('"'); stringBuilder.Append(", Scale = " + Scale); stringBuilder.Append(", IsNegative = " + IsNegative); stringBuilder.Append(']'); return stringBuilder.ToString(); } } [DebuggerTypeProxy(typeof(System.MemoryDebugView<>))] [DebuggerDisplay("{ToString(),raw}")] public readonly struct Memory<T> { private readonly object _object; private readonly int _index; private readonly int _length; private const int RemoveFlagsBitMask = int.MaxValue; public static Memory<T> Empty => default(Memory<T>); public int Length => _length & 0x7FFFFFFF; public bool IsEmpty => (_length & 0x7FFFFFFF) == 0; public Span<T> Span { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { Span<T> result; if (_index < 0) { result = ((MemoryManager<T>)_object).GetSpan(); return result.Slice(_index & 0x7FFFFFFF, _length); } if (typeof(T) == typeof(char) && _object is string text) { result = new Span<T>(Unsafe.As<Pinnable<T>>(text), MemoryExtensions.StringAdjustment, text.Length); return result.Slice(_index, _length); } if (_object != null) { return new Span<T>((T[])_object, _index, _length & 0x7FFFFFFF); } result = default(Span<T>); return result; } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public Memory(T[] array) { if (array == null) { this = default(Memory<T>); return; } if (default(T) == null && array.GetType() != typeof(T[])) { System.ThrowHelper.ThrowArrayTypeMismatchException(); } _object = array; _index = 0; _length = array.Length; } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal Memory(T[] array, int start) { if (array == null) { if (start != 0) { System.ThrowHelper.ThrowArgumentOutOfRangeException(); } this = default(Memory<T>); return; } if (default(T) == null && array.GetType() != typeof(T[])) { System.ThrowHelper.ThrowArrayTypeMismatchException(); } if ((uint)start > (uint)array.Length) { System.ThrowHelper.ThrowArgumentOutOfRangeException(); } _object = array; _index = start; _length = array.Length - start; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public Memory(T[] array, int start, int length) { if (array == null) { if (start != 0 || length != 0) { System.ThrowHelper.ThrowArgumentOutOfRangeException(); } this = default(Memory<T>); return; } if (default(T) == null && array.GetType() != typeof(T[])) { System.ThrowHelper.ThrowArrayTypeMismatchException(); } if ((uint)start > (uint)array.Length || (uint)length > (uint)(array.Length - start)) { System.ThrowHelper.ThrowArgumentOutOfRangeException(); } _object = array; _index = start; _length = length; } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal Memory(MemoryManager<T> manager, int length) { if (length < 0) { System.ThrowHelper.ThrowArgumentOutOfRangeException(); } _object = manager; _index = int.MinValue; _length = length; } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal Memory(MemoryManager<T> manager, int start, int length) { if (length < 0 || start < 0) { System.ThrowHelper.ThrowArgumentOutOfRangeException(); } _object = manager; _index = start | int.MinValue; _length = length; } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal Memory(object obj, int start, int length) { _object = obj; _index = start; _length = length; } public static implicit operator Memory<T>(T[] array) { return new Memory<T>(array); } public static implicit operator Memory<T>(ArraySegment<T> segment) { return new Memory<T>(segment.Array, segment.Offset, segment.Count); } public static implicit operator ReadOnlyMemory<T>(Memory<T> memory) { return Unsafe.As<Memory<T>, ReadOnlyMemory<T>>(ref memory); } public override string ToString() { if (typeof(T) == typeof(char)) { if (!(_object is string text)) { return Span.ToString(); } return text.Substring(_index, _length & 0x7FFFFFFF); } return $"System.Memory<{typeof(T).Name}>[{_length & 0x7FFFFFFF}]"; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public Memory<T> Slice(int start) { int length = _length; int num = length & 0x7FFFFFFF; if ((uint)start > (uint)num) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } return new Memory<T>(_object, _index + start, length - start); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public Memory<T> Slice(int start, int length) { int length2 = _length; int num = length2 & 0x7FFFFFFF; if ((uint)start > (uint)num || (uint)length > (uint)(num - start)) { System.ThrowHelper.ThrowArgumentOutOfRangeException(); } return new Memory<T>(_object, _index + start, length | (length2 & int.MinValue)); } public void CopyTo(Memory<T> destination) { Span.CopyTo(destination.Span); } public bool TryCopyTo(Memory<T> destination) { return Span.TryCopyTo(destination.Span); } public unsafe MemoryHandle Pin() { if (_index < 0) { return ((MemoryManager<T>)_object).Pin(_index & 0x7FFFFFFF); } if (typeof(T) == typeof(char) && _object is string value) { GCHandle handle = GCHandle.Alloc(value, GCHandleType.Pinned); void* pointer = Unsafe.Add<T>((void*)handle.AddrOfPinnedObject(), _index); return new MemoryHandle(pointer, handle); } if (_object is T[] array) { if (_length < 0) { void* pointer2 = Unsafe.Add<T>(Unsafe.AsPointer(ref MemoryMarshal.GetReference<T>(array)), _index); return new MemoryHandle(pointer2); } GCHandle handle2 = GCHandle.Alloc(array, GCHandleType.Pinned); void* pointer3 = Unsafe.Add<T>((void*)handle2.AddrOfPinnedObject(), _index); return new MemoryHandle(pointer3, handle2); } return default(MemoryHandle); } public T[] ToArray() { return Span.ToArray(); } [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) { if (obj is ReadOnlyMemory<T> readOnlyMemory) { return readOnlyMemory.Equals(this); } if (obj is Memory<T> other) { return Equals(other); } return false; } public bool Equals(Memory<T> other) { if (_object == other._object && _index == other._index) { return _length == other._length; } return false; } [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() { if (_object == null) { return 0; } int hashCode = _object.GetHashCode(); int index = _index; int hashCode2 = index.GetHashCode(); index = _length; return CombineHashCodes(hashCode, hashCode2, index.GetHashCode()); } private static int CombineHashCodes(int left, int right) { return ((left << 5) + left) ^ right; } private static int CombineHashCodes(int h1, int h2, int h3) { return CombineHashCodes(CombineHashCodes(h1, h2), h3); } } internal sealed class MemoryDebugView<T> { private readonly ReadOnlyMemory<T> _memory; [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] public T[] Items => _memory.ToArray(); public MemoryDebugView(Memory<T> memory) { _memory = memory; } public MemoryDebugView(ReadOnlyMemory<T> memory) { _memory = memory; } } public static class MemoryExtensions { internal static readonly IntPtr StringAdjustment = MeasureStringAdjustment(); public static ReadOnlySpan<char> Trim(this ReadOnlySpan<char> span) { return span.TrimStart().TrimEnd(); } public static ReadOnlySpan<char> TrimStart(this ReadOnlySpan<char> span) { int i; for (i = 0; i < span.Length && char.IsWhiteSpace(span[i]); i++) { } return span.Slice(i); } public static ReadOnlySpan<char> TrimEnd(this ReadOnlySpan<char> span) { int num = span.Length - 1; while (num >= 0 && char.IsWhiteSpace(span[num])) { num--; } return span.Slice(0, num + 1); } public static ReadOnlySpan<char> Trim(this ReadOnlySpan<char> span, char trimChar) { return span.TrimStart(trimChar).TrimEnd(trimChar); } public static ReadOnlySpan<char> TrimStart(this ReadOnlySpan<char> span, char trimChar) { int i; for (i = 0; i < span.Length && span[i] == trimChar; i++) { } return span.Slice(i); } public static ReadOnlySpan<char> TrimEnd(this ReadOnlySpan<char> span, char trimChar) { int num = span.Length - 1; while (num >= 0 && span[num] == trimChar) { num--; } return span.Slice(0, num + 1); } public static ReadOnlySpan<char> Trim(this ReadOnlySpan<char> span, ReadOnlySpan<char> trimChars) { return span.TrimStart(trimChars).TrimEnd(trimChars); } public static ReadOnlySpan<char> TrimStart(this ReadOnlySpan<char> span, ReadOnlySpan<char> trimChars) { if (trimChars.IsEmpty) { return span.TrimStart(); } int i; for (i = 0; i < span.Length; i++) { int num = 0; while (num < trimChars.Length) { if (span[i] != trimChars[num]) { num++; continue; } goto IL_003c; } break; IL_003c:; } return span.Slice(i); } public static ReadOnlySpan<char> TrimEnd(this ReadOnlySpan<char> span, ReadOnlySpan<char> trimChars) { if (trimChars.IsEmpty) { return span.TrimEnd(); } int num; for (num = span.Length - 1; num >= 0; num--) { int num2 = 0; while (num2 < trimChars.Length) { if (span[num] != trimChars[num2]) { num2++; continue; } goto IL_0044; } break; IL_0044:; } return span.Slice(0, num + 1); } public static bool IsWhiteSpace(this ReadOnlySpan<char> span) { for (int i = 0; i < span.Length; i++) { if (!char.IsWhiteSpace(span[i])) { return false; } } return true; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int IndexOf<T>(this Span<T> span, T value) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.IndexOf(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, byte>(ref value), span.Length); } if (typeof(T) == typeof(char)) { return System.SpanHelpers.IndexOf(ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, char>(ref value), span.Length); } return System.SpanHelpers.IndexOf(ref MemoryMarshal.GetReference(span), value, span.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int IndexOf<T>(this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.IndexOf(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), span.Length, ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(value)), value.Length); } return System.SpanHelpers.IndexOf(ref MemoryMarshal.GetReference(span), span.Length, ref MemoryMarshal.GetReference(value), value.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int LastIndexOf<T>(this Span<T> span, T value) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.LastIndexOf(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, byte>(ref value), span.Length); } if (typeof(T) == typeof(char)) { return System.SpanHelpers.LastIndexOf(ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, char>(ref value), span.Length); } return System.SpanHelpers.LastIndexOf(ref MemoryMarshal.GetReference(span), value, span.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int LastIndexOf<T>(this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.LastIndexOf(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), span.Length, ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(value)), value.Length); } return System.SpanHelpers.LastIndexOf(ref MemoryMarshal.GetReference(span), span.Length, ref MemoryMarshal.GetReference(value), value.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool SequenceEqual<T>(this Span<T> span, ReadOnlySpan<T> other) where T : IEquatable<T> { int length = span.Length; if (default(T) != null && IsTypeComparableAsBytes<T>(out var size)) { if (length == other.Length) { return System.SpanHelpers.SequenceEqual(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(other)), (NUInt)length * size); } return false; } if (length == other.Length) { return System.SpanHelpers.SequenceEqual(ref MemoryMarshal.GetReference(span), ref MemoryMarshal.GetReference(other), length); } return false; } public static int SequenceCompareTo<T>(this Span<T> span, ReadOnlySpan<T> other) where T : IComparable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.SequenceCompareTo(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), span.Length, ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(other)), other.Length); } if (typeof(T) == typeof(char)) { return System.SpanHelpers.SequenceCompareTo(ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(span)), span.Length, ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(other)), other.Length); } return System.SpanHelpers.SequenceCompareTo(ref MemoryMarshal.GetReference(span), span.Length, ref MemoryMarshal.GetReference(other), other.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int IndexOf<T>(this ReadOnlySpan<T> span, T value) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.IndexOf(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, byte>(ref value), span.Length); } if (typeof(T) == typeof(char)) { return System.SpanHelpers.IndexOf(ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, char>(ref value), span.Length); } return System.SpanHelpers.IndexOf(ref MemoryMarshal.GetReference(span), value, span.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int IndexOf<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> value) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.IndexOf(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), span.Length, ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(value)), value.Length); } return System.SpanHelpers.IndexOf(ref MemoryMarshal.GetReference(span), span.Length, ref MemoryMarshal.GetReference(value), value.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int LastIndexOf<T>(this ReadOnlySpan<T> span, T value) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.LastIndexOf(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, byte>(ref value), span.Length); } if (typeof(T) == typeof(char)) { return System.SpanHelpers.LastIndexOf(ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, char>(ref value), span.Length); } return System.SpanHelpers.LastIndexOf(ref MemoryMarshal.GetReference(span), value, span.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int LastIndexOf<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> value) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.LastIndexOf(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), span.Length, ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(value)), value.Length); } return System.SpanHelpers.LastIndexOf(ref MemoryMarshal.GetReference(span), span.Length, ref MemoryMarshal.GetReference(value), value.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int IndexOfAny<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.IndexOfAny(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, byte>(ref value0), Unsafe.As<T, byte>(ref value1), span.Length); } return System.SpanHelpers.IndexOfAny(ref MemoryMarshal.GetReference(span), value0, value1, span.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int IndexOfAny<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.IndexOfAny(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, byte>(ref value0), Unsafe.As<T, byte>(ref value1), Unsafe.As<T, byte>(ref value2), span.Length); } return System.SpanHelpers.IndexOfAny(ref MemoryMarshal.GetReference(span), value0, value1, value2, span.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int IndexOfAny<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.IndexOfAny(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), span.Length, ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(values)), values.Length); } return System.SpanHelpers.IndexOfAny(ref MemoryMarshal.GetReference(span), span.Length, ref MemoryMarshal.GetReference(values), values.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int IndexOfAny<T>(this ReadOnlySpan<T> span, T value0, T value1) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.IndexOfAny(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, byte>(ref value0), Unsafe.As<T, byte>(ref value1), span.Length); } return System.SpanHelpers.IndexOfAny(ref MemoryMarshal.GetReference(span), value0, value1, span.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int IndexOfAny<T>(this ReadOnlySpan<T> span, T value0, T value1, T value2) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.IndexOfAny(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, byte>(ref value0), Unsafe.As<T, byte>(ref value1), Unsafe.As<T, byte>(ref value2), span.Length); } return System.SpanHelpers.IndexOfAny(ref MemoryMarshal.GetReference(span), value0, value1, value2, span.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int IndexOfAny<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> values) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.IndexOfAny(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), span.Length, ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(values)), values.Length); } return System.SpanHelpers.IndexOfAny(ref MemoryMarshal.GetReference(span), span.Length, ref MemoryMarshal.GetReference(values), values.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int LastIndexOfAny<T>(this Span<T> span, T value0, T value1) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.LastIndexOfAny(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, byte>(ref value0), Unsafe.As<T, byte>(ref value1), span.Length); } return System.SpanHelpers.LastIndexOfAny(ref MemoryMarshal.GetReference(span), value0, value1, span.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int LastIndexOfAny<T>(this Span<T> span, T value0, T value1, T value2) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.LastIndexOfAny(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, byte>(ref value0), Unsafe.As<T, byte>(ref value1), Unsafe.As<T, byte>(ref value2), span.Length); } return System.SpanHelpers.LastIndexOfAny(ref MemoryMarshal.GetReference(span), value0, value1, value2, span.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int LastIndexOfAny<T>(this Span<T> span, ReadOnlySpan<T> values) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.LastIndexOfAny(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), span.Length, ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(values)), values.Length); } return System.SpanHelpers.LastIndexOfAny(ref MemoryMarshal.GetReference(span), span.Length, ref MemoryMarshal.GetReference(values), values.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int LastIndexOfAny<T>(this ReadOnlySpan<T> span, T value0, T value1) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.LastIndexOfAny(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, byte>(ref value0), Unsafe.As<T, byte>(ref value1), span.Length); } return System.SpanHelpers.LastIndexOfAny(ref MemoryMarshal.GetReference(span), value0, value1, span.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int LastIndexOfAny<T>(this ReadOnlySpan<T> span, T value0, T value1, T value2) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.LastIndexOfAny(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), Unsafe.As<T, byte>(ref value0), Unsafe.As<T, byte>(ref value1), Unsafe.As<T, byte>(ref value2), span.Length); } return System.SpanHelpers.LastIndexOfAny(ref MemoryMarshal.GetReference(span), value0, value1, value2, span.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int LastIndexOfAny<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> values) where T : IEquatable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.LastIndexOfAny(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), span.Length, ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(values)), values.Length); } return System.SpanHelpers.LastIndexOfAny(ref MemoryMarshal.GetReference(span), span.Length, ref MemoryMarshal.GetReference(values), values.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool SequenceEqual<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> other) where T : IEquatable<T> { int length = span.Length; if (default(T) != null && IsTypeComparableAsBytes<T>(out var size)) { if (length == other.Length) { return System.SpanHelpers.SequenceEqual(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(other)), (NUInt)length * size); } return false; } if (length == other.Length) { return System.SpanHelpers.SequenceEqual(ref MemoryMarshal.GetReference(span), ref MemoryMarshal.GetReference(other), length); } return false; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int SequenceCompareTo<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> other) where T : IComparable<T> { if (typeof(T) == typeof(byte)) { return System.SpanHelpers.SequenceCompareTo(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), span.Length, ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(other)), other.Length); } if (typeof(T) == typeof(char)) { return System.SpanHelpers.SequenceCompareTo(ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(span)), span.Length, ref Unsafe.As<T, char>(ref MemoryMarshal.GetReference(other)), other.Length); } return System.SpanHelpers.SequenceCompareTo(ref MemoryMarshal.GetReference(span), span.Length, ref MemoryMarshal.GetReference(other), other.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool StartsWith<T>(this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T> { int length = value.Length; if (default(T) != null && IsTypeComparableAsBytes<T>(out var size)) { if (length <= span.Length) { return System.SpanHelpers.SequenceEqual(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(value)), (NUInt)length * size); } return false; } if (length <= span.Length) { return System.SpanHelpers.SequenceEqual(ref MemoryMarshal.GetReference(span), ref MemoryMarshal.GetReference(value), length); } return false; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool StartsWith<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> value) where T : IEquatable<T> { int length = value.Length; if (default(T) != null && IsTypeComparableAsBytes<T>(out var size)) { if (length <= span.Length) { return System.SpanHelpers.SequenceEqual(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(span)), ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(value)), (NUInt)length * size); } return false; } if (length <= span.Length) { return System.SpanHelpers.SequenceEqual(ref MemoryMarshal.GetReference(span), ref MemoryMarshal.GetReference(value), length); } return false; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool EndsWith<T>(this Span<T> span, ReadOnlySpan<T> value) where T : IEquatable<T> { int length = span.Length; int length2 = value.Length; if (default(T) != null && IsTypeComparableAsBytes<T>(out var size)) { if (length2 <= length) { return System.SpanHelpers.SequenceEqual(ref Unsafe.As<T, byte>(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), length - length2)), ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(value)), (NUInt)length2 * size); } return false; } if (length2 <= length) { return System.SpanHelpers.SequenceEqual(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), length - length2), ref MemoryMarshal.GetReference(value), length2); } return false; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool EndsWith<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> value) where T : IEquatable<T> { int length = span.Length; int length2 = value.Length; if (default(T) != null && IsTypeComparableAsBytes<T>(out var size)) { if (length2 <= length) { return System.SpanHelpers.SequenceEqual(ref Unsafe.As<T, byte>(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), length - length2)), ref Unsafe.As<T, byte>(ref MemoryMarshal.GetReference(value)), (NUInt)length2 * size); } return false; } if (length2 <= length) { return System.SpanHelpers.SequenceEqual(ref Unsafe.Add(ref MemoryMarshal.GetReference(span), length - length2), ref MemoryMarshal.GetReference(value), length2); } return false; } public static void Reverse<T>(this Span<T> span) { ref T reference = ref MemoryMarshal.GetReference(span); int num = 0; int num2 = span.Length - 1; while (num < num2) { T val = Unsafe.Add(ref reference, num); Unsafe.Add(ref reference, num) = Unsafe.Add(ref reference, num2); Unsafe.Add(ref reference, num2) = val; num++; num2--; } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Span<T> AsSpan<T>(this T[] array) { return new Span<T>(array); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Span<T> AsSpan<T>(this T[] array, int start, int length) { return new Span<T>(array, start, length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Span<T> AsSpan<T>(this ArraySegment<T> segment) { return new Span<T>(segment.Array, segment.Offset, segment.Count); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Span<T> AsSpan<T>(this ArraySegment<T> segment, int start) { if ((uint)start > segment.Count) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } return new Span<T>(segment.Array, segment.Offset + start, segment.Count - start); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Span<T> AsSpan<T>(this ArraySegment<T> segment, int start, int length) { if ((uint)start > segment.Count) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } if ((uint)length > segment.Count - start) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.length); } return new Span<T>(segment.Array, segment.Offset + start, length); } public static Memory<T> AsMemory<T>(this T[] array) { return new Memory<T>(array); } public static Memory<T> AsMemory<T>(this T[] array, int start) { return new Memory<T>(array, start); } public static Memory<T> AsMemory<T>(this T[] array, int start, int length) { return new Memory<T>(array, start, length); } public static Memory<T> AsMemory<T>(this ArraySegment<T> segment) { return new Memory<T>(segment.Array, segment.Offset, segment.Count); } public static Memory<T> AsMemory<T>(this ArraySegment<T> segment, int start) { if ((uint)start > segment.Count) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } return new Memory<T>(segment.Array, segment.Offset + start, segment.Count - start); } public static Memory<T> AsMemory<T>(this ArraySegment<T> segment, int start, int length) { if ((uint)start > segment.Count) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } if ((uint)length > segment.Count - start) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.length); } return new Memory<T>(segment.Array, segment.Offset + start, length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void CopyTo<T>(this T[] source, Span<T> destination) { new ReadOnlySpan<T>(source).CopyTo(destination); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void CopyTo<T>(this T[] source, Memory<T> destination) { source.CopyTo(destination.Span); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool Overlaps<T>(this Span<T> span, ReadOnlySpan<T> other) { return ((ReadOnlySpan<T>)span).Overlaps(other); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool Overlaps<T>(this Span<T> span, ReadOnlySpan<T> other, out int elementOffset) { return ((ReadOnlySpan<T>)span).Overlaps(other, out elementOffset); } public static bool Overlaps<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> other) { if (span.IsEmpty || other.IsEmpty) { return false; } IntPtr intPtr = Unsafe.ByteOffset(ref MemoryMarshal.GetReference(span), ref MemoryMarshal.GetReference(other)); if (Unsafe.SizeOf<IntPtr>() == 4) { if ((uint)(int)intPtr >= (uint)(span.Length * Unsafe.SizeOf<T>())) { return (uint)(int)intPtr > (uint)(-(other.Length * Unsafe.SizeOf<T>())); } return true; } if ((ulong)(long)intPtr >= (ulong)((long)span.Length * (long)Unsafe.SizeOf<T>())) { return (ulong)(long)intPtr > (ulong)(-((long)other.Length * (long)Unsafe.SizeOf<T>())); } return true; } public static bool Overlaps<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> other, out int elementOffset) { if (span.IsEmpty || other.IsEmpty) { elementOffset = 0; return false; } IntPtr intPtr = Unsafe.ByteOffset(ref MemoryMarshal.GetReference(span), ref MemoryMarshal.GetReference(other)); if (Unsafe.SizeOf<IntPtr>() == 4) { if ((uint)(int)intPtr < (uint)(span.Length * Unsafe.SizeOf<T>()) || (uint)(int)intPtr > (uint)(-(other.Length * Unsafe.SizeOf<T>()))) { if ((int)intPtr % Unsafe.SizeOf<T>() != 0) { System.ThrowHelper.ThrowArgumentException_OverlapAlignmentMismatch(); } elementOffset = (int)intPtr / Unsafe.SizeOf<T>(); return true; } elementOffset = 0; return false; } if ((ulong)(long)intPtr < (ulong)((long)span.Length * (long)Unsafe.SizeOf<T>()) || (ulong)(long)intPtr > (ulong)(-((long)other.Length * (long)Unsafe.SizeOf<T>()))) { if ((long)intPtr % Unsafe.SizeOf<T>() != 0L) { System.ThrowHelper.ThrowArgumentException_OverlapAlignmentMismatch(); } elementOffset = (int)((long)intPtr / Unsafe.SizeOf<T>()); return true; } elementOffset = 0; return false; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int BinarySearch<T>(this Span<T> span, IComparable<T> comparable) { return span.BinarySearch<T, IComparable<T>>(comparable); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int BinarySearch<T, TComparable>(this Span<T> span, TComparable comparable) where TComparable : IComparable<T> { return BinarySearch((ReadOnlySpan<T>)span, comparable); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int BinarySearch<T, TComparer>(this Span<T> span, T value, TComparer comparer) where TComparer : IComparer<T> { return ((ReadOnlySpan<T>)span).BinarySearch(value, comparer); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int BinarySearch<T>(this ReadOnlySpan<T> span, IComparable<T> comparable) { return MemoryExtensions.BinarySearch<T, IComparable<T>>(span, comparable); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int BinarySearch<T, TComparable>(this ReadOnlySpan<T> span, TComparable comparable) where TComparable : IComparable<T> { return System.SpanHelpers.BinarySearch(span, comparable); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int BinarySearch<T, TComparer>(this ReadOnlySpan<T> span, T value, TComparer comparer) where TComparer : IComparer<T> { if (comparer == null) { System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.comparer); } System.SpanHelpers.ComparerComparable<T, TComparer> comparable = new System.SpanHelpers.ComparerComparable<T, TComparer>(value, comparer); return BinarySearch(span, comparable); } [MethodImpl(MethodImplOptions.AggressiveInlining)] private static bool IsTypeComparableAsBytes<T>(out NUInt size) { if (typeof(T) == typeof(byte) || typeof(T) == typeof(sbyte)) { size = (NUInt)1; return true; } if (typeof(T) == typeof(char) || typeof(T) == typeof(short) || typeof(T) == typeof(ushort)) { size = (NUInt)2; return true; } if (typeof(T) == typeof(int) || typeof(T) == typeof(uint)) { size = (NUInt)4; return true; } if (typeof(T) == typeof(long) || typeof(T) == typeof(ulong)) { size = (NUInt)8; return true; } size = default(NUInt); return false; } public static Span<T> AsSpan<T>(this T[] array, int start) { return Span<T>.Create(array, start); } public static bool Contains(this ReadOnlySpan<char> span, ReadOnlySpan<char> value, StringComparison comparisonType) { return span.IndexOf(value, comparisonType) >= 0; } public static bool Equals(this ReadOnlySpan<char> span, ReadOnlySpan<char> other, StringComparison comparisonType) { switch (comparisonType) { case StringComparison.Ordinal: return span.SequenceEqual(other); case StringComparison.OrdinalIgnoreCase: if (span.Length != other.Length) { return false; } return EqualsOrdinalIgnoreCase(span, other); default: return span.ToString().Equals(other.ToString(), comparisonType); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] private static bool EqualsOrdinalIgnoreCase(ReadOnlySpan<char> span, ReadOnlySpan<char> other) { if (other.Length == 0) { return true; } return CompareToOrdinalIgnoreCase(span, other) == 0; } public static int CompareTo(this ReadOnlySpan<char> span, ReadOnlySpan<char> other, StringComparison comparisonType) { return comparisonType switch { StringComparison.Ordinal => span.SequenceCompareTo(other), StringComparison.OrdinalIgnoreCase => CompareToOrdinalIgnoreCase(span, other), _ => string.Compare(span.ToString(), other.ToString(), comparisonType), }; } private unsafe static int CompareToOrdinalIgnoreCase(ReadOnlySpan<char> strA, ReadOnlySpan<char> strB) { int num = Math.Min(strA.Length, strB.Length); int num2 = num; fixed (char* ptr = &MemoryMarshal.GetReference(strA)) { fixed (char* ptr3 = &MemoryMarshal.GetReference(strB)) { char* ptr2 = ptr; char* ptr4 = ptr3; while (num != 0 && *ptr2 <= '\u007f' && *ptr4 <= '\u007f') { int num3 = *ptr2; int num4 = *ptr4; if (num3 == num4) { ptr2++; ptr4++; num--; continue; } if ((uint)(num3 - 97) <= 25u) { num3 -= 32; } if ((uint)(num4 - 97) <= 25u) { num4 -= 32; } if (num3 != num4) { return num3 - num4; } ptr2++; ptr4++; num--; } if (num == 0) { return strA.Length - strB.Length; } num2 -= num; return string.Compare(strA.Slice(num2).ToString(), strB.Slice(num2).ToString(), StringComparison.OrdinalIgnoreCase); } } } public static int IndexOf(this ReadOnlySpan<char> span, ReadOnlySpan<char> value, StringComparison comparisonType) { if (comparisonType == StringComparison.Ordinal) { return span.IndexOf(value); } return span.ToString().IndexOf(value.ToString(), comparisonType); } public static int ToLower(this ReadOnlySpan<char> source, Span<char> destination, CultureInfo culture) { if (culture == null) { System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.culture); } if (destination.Length < source.Length) { return -1; } string text = source.ToString(); string text2 = text.ToLower(culture); AsSpan(text2).CopyTo(destination); return source.Length; } public static int ToLowerInvariant(this ReadOnlySpan<char> source, Span<char> destination) { return source.ToLower(destination, CultureInfo.InvariantCulture); } public static int ToUpper(this ReadOnlySpan<char> source, Span<char> destination, CultureInfo culture) { if (culture == null) { System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.culture); } if (destination.Length < source.Length) { return -1; } string text = source.ToString(); string text2 = text.ToUpper(culture); AsSpan(text2).CopyTo(destination); return source.Length; } public static int ToUpperInvariant(this ReadOnlySpan<char> source, Span<char> destination) { return source.ToUpper(destination, CultureInfo.InvariantCulture); } public static bool EndsWith(this ReadOnlySpan<char> span, ReadOnlySpan<char> value, StringComparison comparisonType) { switch (comparisonType) { case StringComparison.Ordinal: return span.EndsWith(value); case StringComparison.OrdinalIgnoreCase: if (value.Length <= span.Length) { return EqualsOrdinalIgnoreCase(span.Slice(span.Length - value.Length), value); } return false; default: { string text = span.ToString(); string value2 = value.ToString(); return text.EndsWith(value2, comparisonType); } } } public static bool StartsWith(this ReadOnlySpan<char> span, ReadOnlySpan<char> value, StringComparison comparisonType) { switch (comparisonType) { case StringComparison.Ordinal: return span.StartsWith(value); case StringComparison.OrdinalIgnoreCase: if (value.Length <= span.Length) { return EqualsOrdinalIgnoreCase(span.Slice(0, value.Length), value); } return false; default: { string text = span.ToString(); string value2 = value.ToString(); return text.StartsWith(value2, comparisonType); } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ReadOnlySpan<char> AsSpan(this string text) { if (text == null) { return default(ReadOnlySpan<char>); } return new ReadOnlySpan<char>(Unsafe.As<Pinnable<char>>(text), StringAdjustment, text.Length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ReadOnlySpan<char> AsSpan(this string text, int start) { if (text == null) { if (start != 0) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } return default(ReadOnlySpan<char>); } if ((uint)start > (uint)text.Length) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } return new ReadOnlySpan<char>(Unsafe.As<Pinnable<char>>(text), StringAdjustment + start * 2, text.Length - start); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ReadOnlySpan<char> AsSpan(this string text, int start, int length) { if (text == null) { if (start != 0 || length != 0) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } return default(ReadOnlySpan<char>); } if ((uint)start > (uint)text.Length || (uint)length > (uint)(text.Length - start)) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } return new ReadOnlySpan<char>(Unsafe.As<Pinnable<char>>(text), StringAdjustment + start * 2, length); } public static ReadOnlyMemory<char> AsMemory(this string text) { if (text == null) { return default(ReadOnlyMemory<char>); } return new ReadOnlyMemory<char>(text, 0, text.Length); } public static ReadOnlyMemory<char> AsMemory(this string text, int start) { if (text == null) { if (start != 0) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } return default(ReadOnlyMemory<char>); } if ((uint)start > (uint)text.Length) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } return new ReadOnlyMemory<char>(text, start, text.Length - start); } public static ReadOnlyMemory<char> AsMemory(this string text, int start, int length) { if (text == null) { if (start != 0 || length != 0) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } return default(ReadOnlyMemory<char>); } if ((uint)start > (uint)text.Length || (uint)length > (uint)(text.Length - start)) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } return new ReadOnlyMemory<char>(text, start, length); } private unsafe static IntPtr MeasureStringAdjustment() { string text = "a"; fixed (char* source = text) { return Unsafe.ByteOffset(ref Unsafe.As<Pinnable<char>>(text).Data, ref Unsafe.AsRef<char>(source)); } } } [DebuggerTypeProxy(typeof(System.MemoryDebugView<>))] [DebuggerDisplay("{ToString(),raw}")] public readonly struct ReadOnlyMemory<T> { private readonly object _object; private readonly int _index; private readonly int _length; internal const int RemoveFlagsBitMask = int.MaxValue; public static ReadOnlyMemory<T> Empty => default(ReadOnlyMemory<T>); public int Length => _length & 0x7FFFFFFF; public bool IsEmpty => (_length & 0x7FFFFFFF) == 0; public ReadOnlySpan<T> Span { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { if (_index < 0) { return ((MemoryManager<T>)_object).GetSpan().Slice(_index & 0x7FFFFFFF, _length); } ReadOnlySpan<T> result; if (typeof(T) == typeof(char) && _object is string text) { result = new ReadOnlySpan<T>(Unsafe.As<Pinnable<T>>(text), MemoryExtensions.StringAdjustment, text.Length); return result.Slice(_index, _length); } if (_object != null) { return new ReadOnlySpan<T>((T[])_object, _index, _length & 0x7FFFFFFF); } result = default(ReadOnlySpan<T>); return result; } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public ReadOnlyMemory(T[] array) { if (array == null) { this = default(ReadOnlyMemory<T>); return; } _object = array; _index = 0; _length = array.Length; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public ReadOnlyMemory(T[] array, int start, int length) { if (array == null) { if (start != 0 || length != 0) { System.ThrowHelper.ThrowArgumentOutOfRangeException(); } this = default(ReadOnlyMemory<T>); return; } if ((uint)start > (uint)array.Length || (uint)length > (uint)(array.Length - start)) { System.ThrowHelper.ThrowArgumentOutOfRangeException(); } _object = array; _index = start; _length = length; } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal ReadOnlyMemory(object obj, int start, int length) { _object = obj; _index = start; _length = length; } public static implicit operator ReadOnlyMemory<T>(T[] array) { return new ReadOnlyMemory<T>(array); } public static implicit operator ReadOnlyMemory<T>(ArraySegment<T> segment) { return new ReadOnlyMemory<T>(segment.Array, segment.Offset, segment.Count); } public override string ToString() { if (typeof(T) == typeof(char)) { if (!(_object is string text)) { return Span.ToString(); } return text.Substring(_index, _length & 0x7FFFFFFF); } return $"System.ReadOnlyMemory<{typeof(T).Name}>[{_length & 0x7FFFFFFF}]"; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public ReadOnlyMemory<T> Slice(int start) { int length = _length; int num = length & 0x7FFFFFFF; if ((uint)start > (uint)num) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } return new ReadOnlyMemory<T>(_object, _index + start, length - start); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public ReadOnlyMemory<T> Slice(int start, int length) { int length2 = _length; int num = _length & 0x7FFFFFFF; if ((uint)start > (uint)num || (uint)length > (uint)(num - start)) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } return new ReadOnlyMemory<T>(_object, _index + start, length | (length2 & int.MinValue)); } public void CopyTo(Memory<T> destination) { Span.CopyTo(destination.Span); } public bool TryCopyTo(Memory<T> destination) { return Span.TryCopyTo(destination.Span); } public unsafe MemoryHandle Pin() { if (_index < 0) { return ((MemoryManager<T>)_object).Pin(_index & 0x7FFFFFFF); } if (typeof(T) == typeof(char) && _object is string value) { GCHandle handle = GCHandle.Alloc(value, GCHandleType.Pinned); void* pointer = Unsafe.Add<T>((void*)handle.AddrOfPinnedObject(), _index); return new MemoryHandle(pointer, handle); } if (_object is T[] array) { if (_length < 0) { void* pointer2 = Unsafe.Add<T>(Unsafe.AsPointer(ref MemoryMarshal.GetReference<T>(array)), _index); return new MemoryHandle(pointer2); } GCHandle handle2 = GCHandle.Alloc(array, GCHandleType.Pinned); void* pointer3 = Unsafe.Add<T>((void*)handle2.AddrOfPinnedObject(), _index); return new MemoryHandle(pointer3, handle2); } return default(MemoryHandle); } public T[] ToArray() { return Span.ToArray(); } [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) { if (obj is ReadOnlyMemory<T> other) { return Equals(other); } if (obj is Memory<T> memory) { return Equals(memory); } return false; } public bool Equals(ReadOnlyMemory<T> other) { if (_object == other._object && _index == other._index) { return _length == other._length; } return false; } [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() { if (_object == null) { return 0; } int hashCode = _object.GetHashCode(); int index = _index; int hashCode2 = index.GetHashCode(); index = _length; return CombineHashCodes(hashCode, hashCode2, index.GetHashCode()); } private static int CombineHashCodes(int left, int right) { return ((left << 5) + left) ^ right; } private static int CombineHashCodes(int h1, int h2, int h3) { return CombineHashCodes(CombineHashCodes(h1, h2), h3); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal object GetObjectStartLength(out int start, out int length) { start = _index; length = _length; return _object; } } [DebuggerTypeProxy(typeof(System.SpanDebugView<>))] [DebuggerDisplay("{ToString(),raw}")] [DebuggerTypeProxy(typeof(System.SpanDebugView<>))] [DebuggerDisplay("{ToString(),raw}")] public readonly ref struct ReadOnlySpan<T> { public ref struct Enumerator { private readonly ReadOnlySpan<T> _span; private int _index; public ref readonly T Current { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { return ref _span[_index]; } } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal Enumerator(ReadOnlySpan<T> span) { _span = span; _index = -1; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool MoveNext() { int num = _index + 1; if (num < _span.Length) { _index = num; return true; } return false; } } private readonly Pinnable<T> _pinnable; private readonly IntPtr _byteOffset; private readonly int _length; public int Length => _length; public bool IsEmpty => _length == 0; public static ReadOnlySpan<T> Empty => default(ReadOnlySpan<T>); public unsafe ref readonly T this[int index] { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { if ((uint)index >= (uint)_length) { System.ThrowHelper.ThrowIndexOutOfRangeException(); } if (_pinnable == null) { IntPtr byteOffset = _byteOffset; return ref Unsafe.Add(ref Unsafe.AsRef<T>(byteOffset.ToPointer()), index); } return ref Unsafe.Add(ref Unsafe.AddByteOffset(ref _pinnable.Data, _byteOffset), index); } } internal Pinnable<T> Pinnable => _pinnable; internal IntPtr ByteOffset => _byteOffset; public static bool operator !=(ReadOnlySpan<T> left, ReadOnlySpan<T> right) { return !(left == right); } [Obsolete("Equals() on ReadOnlySpan will always throw an exception. Use == instead.")] [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) { throw new NotSupportedException(System.SR.NotSupported_CannotCallEqualsOnSpan); } [Obsolete("GetHashCode() on ReadOnlySpan will always throw an exception.")] [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() { throw new NotSupportedException(System.SR.NotSupported_CannotCallGetHashCodeOnSpan); } public static implicit operator ReadOnlySpan<T>(T[] array) { return new ReadOnlySpan<T>(array); } public static implicit operator ReadOnlySpan<T>(ArraySegment<T> segment) { return new ReadOnlySpan<T>(segment.Array, segment.Offset, segment.Count); } public Enumerator GetEnumerator() { return new Enumerator(this); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public ReadOnlySpan(T[] array) { if (array == null) { this = default(ReadOnlySpan<T>); return; } _length = array.Length; _pinnable = Unsafe.As<Pinnable<T>>(array); _byteOffset = System.SpanHelpers.PerTypeValues<T>.ArrayAdjustment; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public ReadOnlySpan(T[] array, int start, int length) { if (array == null) { if (start != 0 || length != 0) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } this = default(ReadOnlySpan<T>); return; } if ((uint)start > (uint)array.Length || (uint)length > (uint)(array.Length - start)) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } _length = length; _pinnable = Unsafe.As<Pinnable<T>>(array); _byteOffset = System.SpanHelpers.PerTypeValues<T>.ArrayAdjustment.Add<T>(start); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [CLSCompliant(false)] public unsafe ReadOnlySpan(void* pointer, int length) { if (System.SpanHelpers.IsReferenceOrContainsReferences<T>()) { System.ThrowHelper.ThrowArgumentException_InvalidTypeWithPointersNotSupported(typeof(T)); } if (length < 0) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } _length = length; _pinnable = null; _byteOffset = new IntPtr(pointer); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal ReadOnlySpan(Pinnable<T> pinnable, IntPtr byteOffset, int length) { _length = length; _pinnable = pinnable; _byteOffset = byteOffset; } [EditorBrowsable(EditorBrowsableState.Never)] public unsafe ref readonly T GetPinnableReference() { if (_length != 0) { if (_pinnable == null) { IntPtr byteOffset = _byteOffset; return ref Unsafe.AsRef<T>(byteOffset.ToPointer()); } return ref Unsafe.AddByteOffset(ref _pinnable.Data, _byteOffset); } return ref Unsafe.AsRef<T>(null); } public void CopyTo(Span<T> destination) { if (!TryCopyTo(destination)) { System.ThrowHelper.ThrowArgumentException_DestinationTooShort(); } } public bool TryCopyTo(Span<T> destination) { int length = _length; int length2 = destination.Length; if (length == 0) { return true; } if ((uint)length > (uint)length2) { return false; } ref T src = ref DangerousGetPinnableReference(); System.SpanHelpers.CopyTo(ref destination.DangerousGetPinnableReference(), length2, ref src, length); return true; } public static bool operator ==(ReadOnlySpan<T> left, ReadOnlySpan<T> right) { if (left._length == right._length) { return Unsafe.AreSame(ref left.DangerousGetPinnableReference(), ref right.DangerousGetPinnableReference()); } return false; } public unsafe override string ToString() { if (typeof(T) == typeof(char)) { if (_byteOffset == MemoryExtensions.StringAdjustment) { object obj = Unsafe.As<object>(_pinnable); if (obj is string text && _length == text.Length) { return text; } } fixed (char* value = &Unsafe.As<T, char>(ref DangerousGetPinnableReference())) { return new string(value, 0, _length); } } return $"System.ReadOnlySpan<{typeof(T).Name}>[{_length}]"; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public ReadOnlySpan<T> Slice(int start) { if ((uint)start > (uint)_length) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } IntPtr byteOffset = _byteOffset.Add<T>(start); int length = _length - start; return new ReadOnlySpan<T>(_pinnable, byteOffset, length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public ReadOnlySpan<T> Slice(int start, int length) { if ((uint)start > (uint)_length || (uint)length > (uint)(_length - start)) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } IntPtr byteOffset = _byteOffset.Add<T>(start); return new ReadOnlySpan<T>(_pinnable, byteOffset, length); } public T[] ToArray() { if (_length == 0) { return System.SpanHelpers.PerTypeValues<T>.EmptyArray; } T[] array = new T[_length]; CopyTo(array); return array; } [MethodImpl(MethodImplOptions.AggressiveInlining)] [EditorBrowsable(EditorBrowsableState.Never)] internal unsafe ref T DangerousGetPinnableReference() { if (_pinnable == null) { IntPtr byteOffset = _byteOffset; return ref Unsafe.AsRef<T>(byteOffset.ToPointer()); } return ref Unsafe.AddByteOffset(ref _pinnable.Data, _byteOffset); } } [DebuggerTypeProxy(typeof(System.SpanDebugView<>))] [DebuggerDisplay("{ToString(),raw}")] [DebuggerTypeProxy(typeof(System.SpanDebugView<>))] [DebuggerDisplay("{ToString(),raw}")] public readonly ref struct Span<T> { public ref struct Enumerator { private readonly Span<T> _span; private int _index; public ref T Current { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { return ref _span[_index]; } } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal Enumerator(Span<T> span) { _span = span; _index = -1; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool MoveNext() { int num = _index + 1; if (num < _span.Length) { _index = num; return true; } return false; } } private readonly Pinnable<T> _pinnable; private readonly IntPtr _byteOffset; private readonly int _length; public int Length => _length; public bool IsEmpty => _length == 0; public static Span<T> Empty => default(Span<T>); public unsafe ref T this[int index] { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { if ((uint)index >= (uint)_length) { System.ThrowHelper.ThrowIndexOutOfRangeException(); } if (_pinnable == null) { IntPtr byteOffset = _byteOffset; return ref Unsafe.Add(ref Unsafe.AsRef<T>(byteOffset.ToPointer()), index); } return ref Unsafe.Add(ref Unsafe.AddByteOffset(ref _pinnable.Data, _byteOffset), index); } } internal Pinnable<T> Pinnable => _pinnable; internal IntPtr ByteOffset => _byteOffset; public static bool operator !=(Span<T> left, Span<T> right) { return !(left == right); } [Obsolete("Equals() on Span will always throw an exception. Use == instead.")] [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) { throw new NotSupportedException(System.SR.NotSupported_CannotCallEqualsOnSpan); } [Obsolete("GetHashCode() on Span will always throw an exception.")] [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() { throw new NotSupportedException(System.SR.NotSupported_CannotCallGetHashCodeOnSpan); } public static implicit operator Span<T>(T[] array) { return new Span<T>(array); } public static implicit operator Span<T>(ArraySegment<T> segment) { return new Span<T>(segment.Array, segment.Offset, segment.Count); } public Enumerator GetEnumerator() { return new Enumerator(this); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public Span(T[] array) { if (array == null) { this = default(Span<T>); return; } if (default(T) == null && array.GetType() != typeof(T[])) { System.ThrowHelper.ThrowArrayTypeMismatchException(); } _length = array.Length; _pinnable = Unsafe.As<Pinnable<T>>(array); _byteOffset = System.SpanHelpers.PerTypeValues<T>.ArrayAdjustment; } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static Span<T> Create(T[] array, int start) { if (array == null) { if (start != 0) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } return default(Span<T>); } if (default(T) == null && array.GetType() != typeof(T[])) { System.ThrowHelper.ThrowArrayTypeMismatchException(); } if ((uint)start > (uint)array.Length) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } IntPtr byteOffset = System.SpanHelpers.PerTypeValues<T>.ArrayAdjustment.Add<T>(start); int length = array.Length - start; return new Span<T>(Unsafe.As<Pinnable<T>>(array), byteOffset, length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public Span(T[] array, int start, int length) { if (array == null) { if (start != 0 || length != 0) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } this = default(Span<T>); return; } if (default(T) == null && array.GetType() != typeof(T[])) { System.ThrowHelper.ThrowArrayTypeMismatchException(); } if ((uint)start > (uint)array.Length || (uint)length > (uint)(array.Length - start)) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } _length = length; _pinnable = Unsafe.As<Pinnable<T>>(array); _byteOffset = System.SpanHelpers.PerTypeValues<T>.ArrayAdjustment.Add<T>(start); } [MethodImpl(MethodImplOptions.AggressiveInlining)] [CLSCompliant(false)] public unsafe Span(void* pointer, int length) { if (System.SpanHelpers.IsReferenceOrContainsReferences<T>()) { System.ThrowHelper.ThrowArgumentException_InvalidTypeWithPointersNotSupported(typeof(T)); } if (length < 0) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } _length = length; _pinnable = null; _byteOffset = new IntPtr(pointer); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal Span(Pinnable<T> pinnable, IntPtr byteOffset, int length) { _length = length; _pinnable = pinnable; _byteOffset = byteOffset; } [EditorBrowsable(EditorBrowsableState.Never)] public unsafe ref T GetPinnableReference() { if (_length != 0) { if (_pinnable == null) { IntPtr byteOffset = _byteOffset; return ref Unsafe.AsRef<T>(byteOffset.ToPointer()); } return ref Unsafe.AddByteOffset(ref _pinnable.Data, _byteOffset); } return ref Unsafe.AsRef<T>(null); } public unsafe void Clear() { int length = _length; if (length == 0) { return; } UIntPtr byteLength = (UIntPtr)(ulong)((uint)length * Unsafe.SizeOf<T>()); if ((Unsafe.SizeOf<T>() & (sizeof(IntPtr) - 1)) != 0) { if (_pinnable == null) { IntPtr byteOffset = _byteOffset; byte* ptr = (byte*)byteOffset.ToPointer(); System.SpanHelpers.ClearLessThanPointerSized(ptr, byteLength); } else { System.SpanHelpers.ClearLessThanPointerSized(ref Unsafe.As<T, byte>(ref Unsafe.AddByteOffset(ref _pinnable.Data, _byteOffset)), byteLength); } } else if (System.SpanHelpers.IsReferenceOrContainsReferences<T>()) { UIntPtr pointerSizeLength = (UIntPtr)(ulong)(length * Unsafe.SizeOf<T>() / sizeof(IntPtr)); System.SpanHelpers.ClearPointerSizedWithReferences(ref Unsafe.As<T, IntPtr>(ref DangerousGetPinnableReference()), pointerSizeLength); } else { System.SpanHelpers.ClearPointerSizedWithoutReferences(ref Unsafe.As<T, byte>(ref DangerousGetPinnableReference()), byteLength); } } public unsafe void Fill(T value) { int length = _length; if (length == 0) { return; } if (Unsafe.SizeOf<T>() == 1) { byte value2 = Unsafe.As<T, byte>(ref value); if (_pinnable == null) { IntPtr byteOffset = _byteOffset; Unsafe.InitBlockUnaligned(byteOffset.ToPointer(), value2, (uint)length); } else { Unsafe.InitBlockUnaligned(ref Unsafe.As<T, byte>(ref Unsafe.AddByteOffset(ref _pinnable.Data, _byteOffset)), value2, (uint)length); } return; } ref T source = ref DangerousGetPinnableReference(); int i; for (i = 0; i < (length & -8); i += 8) { Unsafe.Add(ref source, i) = value; Unsafe.Add(ref source, i + 1) = value; Unsafe.Add(ref source, i + 2) = value; Unsafe.Add(ref source, i + 3) = value; Unsafe.Add(ref source, i + 4) = value; Unsafe.Add(ref source, i + 5) = value; Unsafe.Add(ref source, i + 6) = value; Unsafe.Add(ref source, i + 7) = value; } if (i < (length & -4)) { Unsafe.Add(ref source, i) = value; Unsafe.Add(ref source, i + 1) = value; Unsafe.Add(ref source, i + 2) = value; Unsafe.Add(ref source, i + 3) = value; i += 4; } for (; i < length; i++) { Unsafe.Add(ref source, i) = value; } } public void CopyTo(Span<T> destination) { if (!TryCopyTo(destination)) { System.ThrowHelper.ThrowArgumentException_DestinationTooShort(); } } public bool TryCopyTo(Span<T> destination) { int length = _length; int length2 = destination._length; if (length == 0) { return true; } if ((uint)length > (uint)length2) { return false; } ref T src = ref DangerousGetPinnableReference(); System.SpanHelpers.CopyTo(ref destination.DangerousGetPinnableReference(), length2, ref src, length); return true; } public static bool operator ==(Span<T> left, Span<T> right) { if (left._length == right._length) { return Unsafe.AreSame(ref left.DangerousGetPinnableReference(), ref right.DangerousGetPinnableReference()); } return false; } public static implicit operator ReadOnlySpan<T>(Span<T> span) { return new ReadOnlySpan<T>(span._pinnable, span._byteOffset, span._length); } public unsafe override string ToString() { if (typeof(T) == typeof(char)) { fixed (char* value = &Unsafe.As<T, char>(ref DangerousGetPinnableReference())) { return new string(value, 0, _length); } } return $"System.Span<{typeof(T).Name}>[{_length}]"; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public Span<T> Slice(int start) { if ((uint)start > (uint)_length) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } IntPtr byteOffset = _byteOffset.Add<T>(start); int length = _length - start; return new Span<T>(_pinnable, byteOffset, length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public Span<T> Slice(int start, int length) { if ((uint)start > (uint)_length || (uint)length > (uint)(_length - start)) { System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument.start); } IntPtr byteOffset = _byteOffset.Add<T>(start); return new Span<T>(_pinnable, byteOffset, length); } public T[] ToArray() { if (_length == 0) { return System.SpanHelpers.PerTypeValues<T>.EmptyArray; } T[] array = new T[_length]; CopyTo(array); return array; } [MethodImpl(MethodImplOptions.AggressiveInlining)] [EditorBrowsable(EditorBrowsableState.Never)] internal unsafe ref T DangerousGetPinnableReference() { if (_pinnable == null) { IntPtr byteOffset = _byteOffset; return ref Unsafe.AsRef<T>(byteOffset.ToPointer()); } return ref Unsafe.AddByteOffset(ref _pinnable.Data, _byteOffset); } } internal sealed class SpanDebugView<T> { private readonly T[] _array; [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] public T[] Items => _array; public SpanDebugView(Span<T> span) { _array = span.ToArray(); } public SpanDebugView(ReadOnlySpan<T> span) { _array = span.ToArray(); } } internal static class SpanHelpers { internal struct ComparerComparable<T, TComparer> : IComparable<T> where TComparer : IComparer<T> { private readonly T _value; private readonly TComparer _comparer; public ComparerComparable(T value, TComparer comparer) { _value = value; _comparer = comparer; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public int CompareTo(T other) { return _comparer.Compare(_value, other); } } [StructLayout(LayoutKind.Sequential, Size = 64)] private struct Reg64 { } [StructLayout(LayoutKind.Sequential, Size = 32)] private struct Reg32 { } [StructLayout(LayoutKind.Sequential, Size = 16)] private struct Reg16 { } public static class PerTypeValues<T> { public static readonly bool IsReferenceOrContainsReferences = IsReferenceOrContainsReferencesCore(typeof(T)); public static readonly T[] EmptyArray = new T[0]; public static readonly IntPtr ArrayAdjustment = MeasureArrayAdjustment(); private static IntPtr MeasureArrayAdjustment() { T[] array = new T[1]; return Unsafe.ByteOffset(ref Unsafe.As<Pinnable<T>>(array).Data, ref array[0]); } } private const ulong XorPowerOfTwoToHighByte = 283686952306184uL; private const ulong XorPowerOfTwoToHighChar = 4295098372uL; [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int BinarySearch<T, TComparable>(this ReadOnlySpan<T> span, TComparable comparable) where TComparable : IComparable<T> { if (comparable == null) { System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.comparable); } return BinarySearch(ref MemoryMarshal.GetReference(span), span.Length, comparable); } public static int BinarySearch<T, TComparable>(ref T spanStart, int length, TComparable comparable) where TComparable : IComparable<T> { int num = 0; int num2 = length - 1; while (num <= num2) { int num3 = num2 + num >>> 1; int num4 = comparable.CompareTo(Unsafe.Add(ref spanStart, num3)); if (num4 == 0) { return num3; } if (num4 > 0) { num = num3 + 1; } else { num2 = num3 - 1; } } return ~num; } public static int IndexOf(ref byte searchSpace, int searchSpaceLength, ref byte value, int valueLength) { if (valueLength == 0) { return 0; } byte value2 = value; ref byte second = ref Unsafe.Add(ref value, 1); int num = valueLength - 1; int num2 = 0; while (true) { int num3 = searchSpaceLength - num2 - num; if (num3 <= 0) { break; } int num4 = IndexOf(ref Unsafe.Add(ref searchSpace, num2), value2, num3); if (num4 == -1) { break; } num2 += num4; if (SequenceEqual(ref Unsafe.Add(ref searchSpace, num2 + 1), ref second, num)) { return num2; } num2++; } return -1; } public static int IndexOfAny(ref byte searchSpace, int searchSpaceLength, ref byte value, int valueLength) { if (valueLength == 0) { return 0; } int num = -1; for (int i = 0; i < valueLength; i++) { int num2 = IndexOf(ref searchSpace, Unsafe.Add(ref value, i), searchSpaceLength); if ((uint)num2 < (uint)num) { num = num2; searchSpaceLength = num2; if (num == 0) { break; } } } return num; } public static int LastIndexOfAny(ref byte searchSpace, int searchSpaceLength, ref byte value, int valueLength) { if (valueLength == 0) { return 0; } int num = -1; for (int i = 0; i < valueLength; i++) { int num2 = LastIndexOf(ref searchSpace, Unsafe.Add(ref value, i), searchSpaceLength); if (num2 > num) { num = num2; } } return num; } public unsafe static int IndexOf(ref byte searchSpace, byte value, int length) { IntPtr intPtr = (IntPtr)0; IntPtr intPtr2 = (IntPtr)length; if (Vector.IsHardwareAccelerated && length >= Vector<byte>.Count * 2) { int num = (int)Unsafe.AsPointer(ref searchSpace) & (Vector<byte>.Count - 1); intPtr2 = (IntPtr)((Vector<byte>.Count - num) & (Vector<byte>.Count - 1)); } while (true) { if ((nuint)(void*)intPtr2 >= (nuint)8u) { intPtr2 -= 8; if (value == Unsafe.AddByteOffset(ref searchSpace, intPtr)) { goto IL_0242; } if (value == Unsafe.AddByteOffset(ref searchSpace, intPtr + 1)) { goto IL_024a; } if (value == Unsafe.AddByteOffset(ref searchSpace, intPtr + 2)) { goto IL_0258; } if (value != Unsafe.AddByteOffset(ref searchSpace, intPtr + 3)) { if (value != Unsafe.AddByteOffset(ref searchSpace, intPtr + 4)) { if (value != Unsafe.AddByteOffset(ref searchSpace, intPtr + 5)) { if (value != Unsafe.AddByteOffset(ref searchSpace, intPtr + 6)) { if (value == Unsafe.AddByteOffset(ref searchSpace, intPtr + 7)) { break; } intPtr += 8; continue; } return (int)(void*)(intPtr + 6); } return (int)(void*)(intPtr + 5); } return (int)(void*)(intPtr + 4); } goto IL_0266; } if ((nuint)(void*)intPtr2 >= (nuint)4u) { intPtr2 -= 4; if (value == Unsafe.AddByteOffset(ref searchSpace, intPtr)) { goto IL_0242; } if (value == Unsafe.AddByteOffset(ref searchSpace, intPtr + 1)) { goto IL_024a; } if (value == Unsafe.AddByteOffset(ref searchSpace, intPtr + 2)) { goto IL_0258; } if (value == Unsafe.AddByteOffset(ref searchSpace, intPtr + 3)) { goto IL_0266; } intPtr += 4; } while ((void*)intPtr2 != null) { intPtr2 -= 1; if (value != Unsafe.AddByteOffset(ref searchSpace, intPtr)) { intPtr += 1; continue; } goto IL_0242; } if (Vector.IsHardwareAccelerated && (int)(void*)intPtr < length) { intPtr2 = (IntPtr)((length - (int)(void*)intPtr) & ~(Vector<byte>.Count - 1)); Vector<byte> vector = GetVector(value); for (; (void*)intPtr2 > (void*)intPtr; intPtr += Vector<byte>.Count) { Vector<byte> vector2 = Vector.Equals(vector, Unsafe.ReadUnaligned<Vector<byte>>(ref Unsafe.AddByteOffset(ref searchSpace, intPtr))); if (!Vector<byte>.Zero.Equals(vector2)) { return (int)(void*)intPtr + LocateFirstFoundByte(vector2); } } if ((int)(void*)intPtr < length) { intPtr2 = (IntPtr)(length - (int)(void*)intPtr); continue; } } return -1; IL_0266: return (int)(void*)(intPtr + 3); IL_0242: return (int)(void*)intPtr; IL_0258: return (int)(void*)(intPtr + 2); IL_024a: return (int)(void*)(intPtr + 1); } return (int)(void*)(intPtr + 7); } public static int LastIndexOf(ref byte searchSpace, int searchSpaceLength, ref byte value, int valueLength) { if (valueLength == 0) { return 0; } byte value2 = value; ref byte second = ref Unsafe.Add(ref value, 1); int num = valueLength - 1; int num2 = 0; while (true) { int num3 = searchSpaceLength - num2 - num; if (num3 <= 0) { break; } int num4 = LastIndexOf(ref searchSpace, value2, num3); if (num4 == -1) { break; } if (SequenceEqual(ref Unsafe.Add(ref searchSpace, num4 + 1), ref second, num)) { return num4; } num2 += num3 - num4; } return -1; } public unsafe static int LastIndexOf(ref byte searchSpace, byte value, int length) { IntPtr intPtr = (IntPtr)length; IntPtr intPtr2 = (IntPtr)length; if (Vector.IsHardwareAccelerated && length >= Vector<byte>.Count * 2) { int num = (int)Unsafe.AsPointer(ref searchSpace) & (Vector<byte>.Count - 1); intPtr2 = (IntPtr)(((length & (Vector<byte>.Count - 1)) + num) & (Vector<byte>.Count - 1)); } while (true) { if ((nuint)(void*)intPtr2 >= (nuint)8u) { intPtr2 -= 8; intPtr -= 8; if (value == Unsafe.AddByteOffset(ref searchSpace, intPtr + 7)) { break; } if (value != Unsafe.AddByteOffset(ref searchSpace, intPtr + 6)) { if (value != Unsafe.AddByteOffset(ref searchSpace, intPtr + 5)) { if (value != Unsafe.AddByteOffset(ref searchSpace, intPtr + 4)) { if (value != Unsafe.AddByteOffset(ref searchSpace, intPtr + 3)) { if (value != Unsafe.AddByteOffset(ref searchSpace, intPtr + 2)) { if (value != Unsafe.AddByteOffset(ref searchSpace, intPtr + 1)) { if (value != Unsafe.AddByteOffset(ref searchSpace, intPtr)) { continue; } goto IL_0254; } goto IL_025c; } goto IL_026a; } goto IL_0278; } return (int)(void*)(intPtr + 4); } return (int)(void*)(intPtr + 5); } return (int)(void*)(intPtr + 6); } if ((nuint)(void*)intPtr2 >= (nuint)4u) { intPtr2 -= 4; intPtr -= 4; if (value == Unsafe.AddByteOffset(ref searchSpace, intPtr + 3)) { goto IL_0278; } if (value == Unsafe.AddByteOffset(ref searchSpace, intPtr + 2)) { goto IL_026a; } if (value == Unsafe.AddByteOffset(ref searchSpace, intPtr + 1)) { goto IL_025c; } if (value == Unsafe.AddByteOffset(ref searchSpace, intPtr)) { goto IL_0254; } } while ((void*)intPtr2 != null) { intPtr2 -= 1; intPtr -= 1; if (val
BepInEx/plugins/Broheim-SileroTTS/System.IO.FileSystem.DriveInfo.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.IO.FileSystem.DriveInfo")] [assembly: AssemblyDescription("System.IO.FileSystem.DriveInfo")] [assembly: AssemblyDefaultAlias("System.IO.FileSystem.DriveInfo")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(DriveInfo))] [assembly: TypeForwardedTo(typeof(DriveNotFoundException))] [assembly: TypeForwardedTo(typeof(DriveType))]
BepInEx/plugins/Broheim-SileroTTS/System.Xml.XPath.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Xml; using System.Xml.XPath; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Xml.XPath")] [assembly: AssemblyDescription("System.Xml.XPath")] [assembly: AssemblyDefaultAlias("System.Xml.XPath")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.3.0")] [assembly: TypeForwardedTo(typeof(XmlNodeOrder))] [assembly: TypeForwardedTo(typeof(IXPathNavigable))] [assembly: TypeForwardedTo(typeof(XmlCaseOrder))] [assembly: TypeForwardedTo(typeof(XmlDataType))] [assembly: TypeForwardedTo(typeof(XmlSortOrder))] [assembly: TypeForwardedTo(typeof(XPathDocument))] [assembly: TypeForwardedTo(typeof(XPathException))] [assembly: TypeForwardedTo(typeof(XPathExpression))] [assembly: TypeForwardedTo(typeof(XPathItem))] [assembly: TypeForwardedTo(typeof(XPathNamespaceScope))] [assembly: TypeForwardedTo(typeof(XPathNavigator))] [assembly: TypeForwardedTo(typeof(XPathNodeIterator))] [assembly: TypeForwardedTo(typeof(XPathNodeType))] [assembly: TypeForwardedTo(typeof(XPathResultType))]
BepInEx/plugins/Broheim-SileroTTS/System.Threading.Thread.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Threading.Thread")] [assembly: AssemblyDescription("System.Threading.Thread")] [assembly: AssemblyDefaultAlias("System.Threading.Thread")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(ParameterizedThreadStart))] [assembly: TypeForwardedTo(typeof(Thread))] [assembly: TypeForwardedTo(typeof(ThreadStart))] [assembly: TypeForwardedTo(typeof(ThreadStartException))] [assembly: TypeForwardedTo(typeof(ThreadState))] [assembly: TypeForwardedTo(typeof(ThreadStateException))]
BepInEx/plugins/Broheim-SileroTTS/ICSharpCode.SharpZipLib.dll
Decompiled 2 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Buffers; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using ICSharpCode.SharpZipLib.BZip2; using ICSharpCode.SharpZipLib.Checksum; using ICSharpCode.SharpZipLib.Core; using ICSharpCode.SharpZipLib.Encryption; using ICSharpCode.SharpZipLib.Zip; using ICSharpCode.SharpZipLib.Zip.Compression; using ICSharpCode.SharpZipLib.Zip.Compression.Streams; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: InternalsVisibleTo("ICSharpCode.SharpZipLib.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b9a14ea8fc9d7599e0e82a1292a23103f0210e2f928a0f466963af23fffadba59dcc8c9e26ecd114d7c0b4179e4bc93b1656b7ee2d4a67dd7c1992653e0d9cc534f7914b6f583b022e0a7aa8a430f407932f9a6806f0fc64d61e78d5ae01aa8f8233196719d44da2c50a2d1cfa3f7abb7487b3567a4f0456aa6667154c6749b1")] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")] [assembly: AssemblyMetadata("IsTrimmable", "True")] [assembly: AssemblyCompany("ICSharpCode")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCopyright("Copyright © 2000-2022 SharpZipLib Contributors")] [assembly: AssemblyDescription("SharpZipLib (#ziplib, formerly NZipLib) is a compression library for Zip, GZip, BZip2, and Tar written entirely in C# for .NET. It is implemented as an assembly (installable in the GAC), and thus can easily be incorporated into other projects (in any .NET language)")] [assembly: AssemblyFileVersion("1.4.0.12")] [assembly: AssemblyInformationalVersion("1.4.0+cea8b0dc154c71040ff74d731ff55c451e8dc59d")] [assembly: AssemblyProduct("ICSharpCode.SharpZipLib")] [assembly: AssemblyTitle("ICSharpCode.SharpZipLib")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/icsharpcode/SharpZipLib")] [assembly: NeutralResourcesLanguage("en-US")] [assembly: AssemblyVersion("1.4.0.12")] namespace ICSharpCode.SharpZipLib { [Serializable] public class SharpZipBaseException : Exception { public SharpZipBaseException() { } public SharpZipBaseException(string message) : base(message) { } public SharpZipBaseException(string message, Exception innerException) : base(message, innerException) { } protected SharpZipBaseException(SerializationInfo info, StreamingContext context) : base(info, context) { } } [Serializable] public class StreamDecodingException : SharpZipBaseException { private const string GenericMessage = "Input stream could not be decoded"; public StreamDecodingException() : base("Input stream could not be decoded") { } public StreamDecodingException(string message) : base(message) { } public StreamDecodingException(string message, Exception innerException) : base(message, innerException) { } protected StreamDecodingException(SerializationInfo info, StreamingContext context) : base(info, context) { } } [Serializable] public class StreamUnsupportedException : StreamDecodingException { private const string GenericMessage = "Input stream is in a unsupported format"; public StreamUnsupportedException() : base("Input stream is in a unsupported format") { } public StreamUnsupportedException(string message) : base(message) { } public StreamUnsupportedException(string message, Exception innerException) : base(message, innerException) { } protected StreamUnsupportedException(SerializationInfo info, StreamingContext context) : base(info, context) { } } [Serializable] public class UnexpectedEndOfStreamException : StreamDecodingException { private const string GenericMessage = "Input stream ended unexpectedly"; public UnexpectedEndOfStreamException() : base("Input stream ended unexpectedly") { } public UnexpectedEndOfStreamException(string message) : base(message) { } public UnexpectedEndOfStreamException(string message, Exception innerException) : base(message, innerException) { } protected UnexpectedEndOfStreamException(SerializationInfo info, StreamingContext context) : base(info, context) { } } [Serializable] public class ValueOutOfRangeException : StreamDecodingException { public ValueOutOfRangeException(string nameOfValue) : base(nameOfValue + " out of range") { } public ValueOutOfRangeException(string nameOfValue, long value, long maxValue, long minValue = 0L) : this(nameOfValue, value.ToString(), maxValue.ToString(), minValue.ToString()) { } public ValueOutOfRangeException(string nameOfValue, string value, string maxValue, string minValue = "0") : base(nameOfValue + " out of range: " + value + ", should be " + minValue + ".." + maxValue) { } private ValueOutOfRangeException() { } private ValueOutOfRangeException(string message, Exception innerException) : base(message, innerException) { } protected ValueOutOfRangeException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } namespace ICSharpCode.SharpZipLib.Zip { public class FastZipEvents { public ProcessFileHandler ProcessFile; public ProgressHandler Progress; public CompletedFileHandler CompletedFile; public DirectoryFailureHandler DirectoryFailure; public FileFailureHandler FileFailure; private TimeSpan progressInterval_ = TimeSpan.FromSeconds(3.0); public TimeSpan ProgressInterval { get { return progressInterval_; } set { progressInterval_ = value; } } public event EventHandler<DirectoryEventArgs> ProcessDirectory; public bool OnDirectoryFailure(string directory, Exception e) { bool result = false; DirectoryFailureHandler directoryFailure = DirectoryFailure; if (directoryFailure != null) { ScanFailureEventArgs e2 = new ScanFailureEventArgs(directory, e); directoryFailure(this, e2); result = e2.ContinueRunning; } return result; } public bool OnFileFailure(string file, Exception e) { FileFailureHandler fileFailure = FileFailure; bool flag = fileFailure != null; if (flag) { ScanFailureEventArgs e2 = new ScanFailureEventArgs(file, e); fileFailure(this, e2); flag = e2.ContinueRunning; } return flag; } public bool OnProcessFile(string file) { bool result = true; ProcessFileHandler processFile = ProcessFile; if (processFile != null) { ScanEventArgs e = new ScanEventArgs(file); processFile(this, e); result = e.ContinueRunning; } return result; } public bool OnCompletedFile(string file) { bool result = true; CompletedFileHandler completedFile = CompletedFile; if (completedFile != null) { ScanEventArgs e = new ScanEventArgs(file); completedFile(this, e); result = e.ContinueRunning; } return result; } public bool OnProcessDirectory(string directory, bool hasMatchingFiles) { bool result = true; EventHandler<DirectoryEventArgs> eventHandler = this.ProcessDirectory; if (eventHandler != null) { DirectoryEventArgs e = new DirectoryEventArgs(directory, hasMatchingFiles); eventHandler(this, e); result = e.ContinueRunning; } return result; } } public class FastZip { public enum Overwrite { Prompt, Never, Always } public delegate bool ConfirmOverwriteDelegate(string fileName); private bool continueRunning_; private byte[] buffer_; private ZipOutputStream outputStream_; private ZipFile zipFile_; private string sourceDirectory_; private NameFilter fileFilter_; private NameFilter directoryFilter_; private Overwrite overwrite_; private ConfirmOverwriteDelegate confirmDelegate_; private bool restoreDateTimeOnExtract_; private bool restoreAttributesOnExtract_; private bool createEmptyDirectories_; private FastZipEvents events_; private IEntryFactory entryFactory_ = new ZipEntryFactory(); private INameTransform extractNameTransform_; private UseZip64 useZip64_ = UseZip64.Dynamic; private Deflater.CompressionLevel compressionLevel_ = Deflater.CompressionLevel.DEFAULT_COMPRESSION; private StringCodec _stringCodec = new StringCodec(); private string password_; public bool CreateEmptyDirectories { get { return createEmptyDirectories_; } set { createEmptyDirectories_ = value; } } public string Password { get { return password_; } set { password_ = value; } } public ZipEncryptionMethod EntryEncryptionMethod { get; set; } = ZipEncryptionMethod.ZipCrypto; public INameTransform NameTransform { get { return entryFactory_.NameTransform; } set { entryFactory_.NameTransform = value; } } public IEntryFactory EntryFactory { get { return entryFactory_; } set { if (value == null) { entryFactory_ = new ZipEntryFactory(); } else { entryFactory_ = value; } } } public UseZip64 UseZip64 { get { return useZip64_; } set { useZip64_ = value; } } public bool RestoreDateTimeOnExtract { get { return restoreDateTimeOnExtract_; } set { restoreDateTimeOnExtract_ = value; } } public bool RestoreAttributesOnExtract { get { return restoreAttributesOnExtract_; } set { restoreAttributesOnExtract_ = value; } } public Deflater.CompressionLevel CompressionLevel { get { return compressionLevel_; } set { compressionLevel_ = value; } } public bool UseUnicode { get { return !_stringCodec.ForceZipLegacyEncoding; } set { _stringCodec.ForceZipLegacyEncoding = !value; } } public int LegacyCodePage { get { return _stringCodec.CodePage; } set { _stringCodec.CodePage = value; } } public StringCodec StringCodec { get { return _stringCodec; } set { _stringCodec = value; } } public FastZip() { } public FastZip(ZipEntryFactory.TimeSetting timeSetting) { entryFactory_ = new ZipEntryFactory(timeSetting); restoreDateTimeOnExtract_ = true; } public FastZip(DateTime time) { entryFactory_ = new ZipEntryFactory(time); restoreDateTimeOnExtract_ = true; } public FastZip(FastZipEvents events) { events_ = events; } public void CreateZip(string zipFileName, string sourceDirectory, bool recurse, string fileFilter, string directoryFilter) { CreateZip(File.Create(zipFileName), sourceDirectory, recurse, fileFilter, directoryFilter); } public void CreateZip(string zipFileName, string sourceDirectory, bool recurse, string fileFilter) { CreateZip(File.Create(zipFileName), sourceDirectory, recurse, fileFilter, null); } public void CreateZip(Stream outputStream, string sourceDirectory, bool recurse, string fileFilter, string directoryFilter) { CreateZip(outputStream, sourceDirectory, recurse, fileFilter, directoryFilter, leaveOpen: false); } public void CreateZip(Stream outputStream, string sourceDirectory, bool recurse, string fileFilter, string directoryFilter, bool leaveOpen) { FileSystemScanner scanner = new FileSystemScanner(fileFilter, directoryFilter); CreateZip(outputStream, sourceDirectory, recurse, scanner, leaveOpen); } public void CreateZip(string zipFileName, string sourceDirectory, bool recurse, IScanFilter fileFilter, IScanFilter directoryFilter) { CreateZip(File.Create(zipFileName), sourceDirectory, recurse, fileFilter, directoryFilter); } public void CreateZip(Stream outputStream, string sourceDirectory, bool recurse, IScanFilter fileFilter, IScanFilter directoryFilter, bool leaveOpen = false) { FileSystemScanner scanner = new FileSystemScanner(fileFilter, directoryFilter); CreateZip(outputStream, sourceDirectory, recurse, scanner, leaveOpen); } private void CreateZip(Stream outputStream, string sourceDirectory, bool recurse, FileSystemScanner scanner, bool leaveOpen) { NameTransform = new ZipNameTransform(sourceDirectory); sourceDirectory_ = sourceDirectory; using (outputStream_ = new ZipOutputStream(outputStream, _stringCodec)) { outputStream_.SetLevel((int)CompressionLevel); outputStream_.IsStreamOwner = !leaveOpen; outputStream_.NameTransform = null; if (!string.IsNullOrEmpty(password_) && EntryEncryptionMethod != ZipEncryptionMethod.None) { outputStream_.Password = password_; } outputStream_.UseZip64 = UseZip64; scanner.ProcessFile = (ProcessFileHandler)Delegate.Combine(scanner.ProcessFile, new ProcessFileHandler(ProcessFile)); if (CreateEmptyDirectories) { scanner.ProcessDirectory += ProcessDirectory; } if (events_ != null) { if (events_.FileFailure != null) { scanner.FileFailure = (FileFailureHandler)Delegate.Combine(scanner.FileFailure, events_.FileFailure); } if (events_.DirectoryFailure != null) { scanner.DirectoryFailure = (DirectoryFailureHandler)Delegate.Combine(scanner.DirectoryFailure, events_.DirectoryFailure); } } scanner.Scan(sourceDirectory, recurse); } } public void ExtractZip(string zipFileName, string targetDirectory, string fileFilter) { ExtractZip(zipFileName, targetDirectory, Overwrite.Always, null, fileFilter, null, restoreDateTimeOnExtract_); } public void ExtractZip(string zipFileName, string targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, string fileFilter, string directoryFilter, bool restoreDateTime, bool allowParentTraversal = false) { Stream inputStream = File.Open(zipFileName, FileMode.Open, FileAccess.Read, FileShare.Read); ExtractZip(inputStream, targetDirectory, overwrite, confirmDelegate, fileFilter, directoryFilter, restoreDateTime, isStreamOwner: true, allowParentTraversal); } public void ExtractZip(Stream inputStream, string targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, string fileFilter, string directoryFilter, bool restoreDateTime, bool isStreamOwner, bool allowParentTraversal = false) { if (overwrite == Overwrite.Prompt && confirmDelegate == null) { throw new ArgumentNullException("confirmDelegate"); } continueRunning_ = true; overwrite_ = overwrite; confirmDelegate_ = confirmDelegate; extractNameTransform_ = new WindowsNameTransform(targetDirectory, allowParentTraversal); fileFilter_ = new NameFilter(fileFilter); directoryFilter_ = new NameFilter(directoryFilter); restoreDateTimeOnExtract_ = restoreDateTime; using (zipFile_ = new ZipFile(inputStream, !isStreamOwner)) { if (password_ != null) { zipFile_.Password = password_; } IEnumerator enumerator = zipFile_.GetEnumerator(); while (continueRunning_ && enumerator.MoveNext()) { ZipEntry zipEntry = (ZipEntry)enumerator.Current; if (zipEntry.IsFile) { if (directoryFilter_.IsMatch(Path.GetDirectoryName(zipEntry.Name)) && fileFilter_.IsMatch(zipEntry.Name)) { ExtractEntry(zipEntry); } } else if (zipEntry.IsDirectory && directoryFilter_.IsMatch(zipEntry.Name) && CreateEmptyDirectories) { ExtractEntry(zipEntry); } } } } private void ProcessDirectory(object sender, DirectoryEventArgs e) { if (!e.HasMatchingFiles && CreateEmptyDirectories) { if (events_ != null) { events_.OnProcessDirectory(e.Name, e.HasMatchingFiles); } if (e.ContinueRunning && e.Name != sourceDirectory_) { ZipEntry entry = entryFactory_.MakeDirectoryEntry(e.Name); outputStream_.PutNextEntry(entry); } } } private void ProcessFile(object sender, ScanEventArgs e) { if (events_ != null && events_.ProcessFile != null) { events_.ProcessFile(sender, e); } if (!e.ContinueRunning) { return; } try { using FileStream stream = File.Open(e.Name, FileMode.Open, FileAccess.Read, FileShare.Read); ZipEntry zipEntry = entryFactory_.MakeFileEntry(e.Name); if (_stringCodec.ForceZipLegacyEncoding) { zipEntry.IsUnicodeText = false; } ConfigureEntryEncryption(zipEntry); outputStream_.PutNextEntry(zipEntry); AddFileContents(e.Name, stream); } catch (Exception e2) { if (events_ != null) { continueRunning_ = events_.OnFileFailure(e.Name, e2); return; } continueRunning_ = false; throw; } } private void ConfigureEntryEncryption(ZipEntry entry) { if (!string.IsNullOrEmpty(Password) && entry.AESEncryptionStrength == 0) { switch (EntryEncryptionMethod) { case ZipEncryptionMethod.AES128: entry.AESKeySize = 128; break; case ZipEncryptionMethod.AES256: entry.AESKeySize = 256; break; } } } private void AddFileContents(string name, Stream stream) { if (stream == null) { throw new ArgumentNullException("stream"); } if (buffer_ == null) { buffer_ = new byte[4096]; } if (events_ != null && events_.Progress != null) { StreamUtils.Copy(stream, outputStream_, buffer_, events_.Progress, events_.ProgressInterval, this, name); } else { StreamUtils.Copy(stream, outputStream_, buffer_); } if (events_ != null) { continueRunning_ = events_.OnCompletedFile(name); } } private void ExtractFileEntry(ZipEntry entry, string targetName) { bool flag = true; if (overwrite_ != Overwrite.Always && File.Exists(targetName)) { flag = overwrite_ == Overwrite.Prompt && confirmDelegate_ != null && confirmDelegate_(targetName); } if (!flag) { return; } if (events_ != null) { continueRunning_ = events_.OnProcessFile(entry.Name); } if (!continueRunning_) { return; } try { using (FileStream destination = File.Create(targetName)) { if (buffer_ == null) { buffer_ = new byte[4096]; } using (Stream source = zipFile_.GetInputStream(entry)) { if (events_ != null && events_.Progress != null) { StreamUtils.Copy(source, destination, buffer_, events_.Progress, events_.ProgressInterval, this, entry.Name, entry.Size); } else { StreamUtils.Copy(source, destination, buffer_); } } if (events_ != null) { continueRunning_ = events_.OnCompletedFile(entry.Name); } } if (restoreDateTimeOnExtract_) { switch (entryFactory_.Setting) { case ZipEntryFactory.TimeSetting.CreateTime: File.SetCreationTime(targetName, entry.DateTime); break; case ZipEntryFactory.TimeSetting.CreateTimeUtc: File.SetCreationTimeUtc(targetName, entry.DateTime); break; case ZipEntryFactory.TimeSetting.LastAccessTime: File.SetLastAccessTime(targetName, entry.DateTime); break; case ZipEntryFactory.TimeSetting.LastAccessTimeUtc: File.SetLastAccessTimeUtc(targetName, entry.DateTime); break; case ZipEntryFactory.TimeSetting.LastWriteTime: File.SetLastWriteTime(targetName, entry.DateTime); break; case ZipEntryFactory.TimeSetting.LastWriteTimeUtc: File.SetLastWriteTimeUtc(targetName, entry.DateTime); break; case ZipEntryFactory.TimeSetting.Fixed: File.SetLastWriteTime(targetName, entryFactory_.FixedDateTime); break; default: throw new ZipException("Unhandled time setting in ExtractFileEntry"); } } if (RestoreAttributesOnExtract && entry.IsDOSEntry && entry.ExternalFileAttributes != -1) { FileAttributes externalFileAttributes = (FileAttributes)entry.ExternalFileAttributes; externalFileAttributes &= FileAttributes.ReadOnly | FileAttributes.Hidden | FileAttributes.Archive | FileAttributes.Normal; File.SetAttributes(targetName, externalFileAttributes); } } catch (Exception e) { if (events_ != null) { continueRunning_ = events_.OnFileFailure(targetName, e); return; } continueRunning_ = false; throw; } } private void ExtractEntry(ZipEntry entry) { bool flag = entry.IsCompressionMethodSupported(); string text = entry.Name; if (flag) { if (entry.IsFile) { text = extractNameTransform_.TransformFile(text); } else if (entry.IsDirectory) { text = extractNameTransform_.TransformDirectory(text); } flag = !string.IsNullOrEmpty(text); } string text2 = string.Empty; if (flag) { text2 = ((!entry.IsDirectory) ? Path.GetDirectoryName(Path.GetFullPath(text)) : text); } if (flag && !Directory.Exists(text2) && (!entry.IsDirectory || CreateEmptyDirectories)) { try { continueRunning_ = events_?.OnProcessDirectory(text2, hasMatchingFiles: true) ?? true; if (continueRunning_) { Directory.CreateDirectory(text2); if (entry.IsDirectory && restoreDateTimeOnExtract_) { switch (entryFactory_.Setting) { case ZipEntryFactory.TimeSetting.CreateTime: Directory.SetCreationTime(text2, entry.DateTime); break; case ZipEntryFactory.TimeSetting.CreateTimeUtc: Directory.SetCreationTimeUtc(text2, entry.DateTime); break; case ZipEntryFactory.TimeSetting.LastAccessTime: Directory.SetLastAccessTime(text2, entry.DateTime); break; case ZipEntryFactory.TimeSetting.LastAccessTimeUtc: Directory.SetLastAccessTimeUtc(text2, entry.DateTime); break; case ZipEntryFactory.TimeSetting.LastWriteTime: Directory.SetLastWriteTime(text2, entry.DateTime); break; case ZipEntryFactory.TimeSetting.LastWriteTimeUtc: Directory.SetLastWriteTimeUtc(text2, entry.DateTime); break; case ZipEntryFactory.TimeSetting.Fixed: Directory.SetLastWriteTime(text2, entryFactory_.FixedDateTime); break; default: throw new ZipException("Unhandled time setting in ExtractEntry"); } } } else { flag = false; } } catch (Exception e) { flag = false; if (events_ == null) { continueRunning_ = false; throw; } if (entry.IsDirectory) { continueRunning_ = events_.OnDirectoryFailure(text, e); } else { continueRunning_ = events_.OnFileFailure(text, e); } } } if (flag && entry.IsFile) { ExtractFileEntry(entry, text); } } private static int MakeExternalAttributes(FileInfo info) { return (int)info.Attributes; } private static bool NameIsValid(string name) { if (!string.IsNullOrEmpty(name)) { return name.IndexOfAny(Path.GetInvalidPathChars()) < 0; } return false; } } public interface IEntryFactory { INameTransform NameTransform { get; set; } ZipEntryFactory.TimeSetting Setting { get; } DateTime FixedDateTime { get; } ZipEntry MakeFileEntry(string fileName); ZipEntry MakeFileEntry(string fileName, bool useFileSystem); ZipEntry MakeFileEntry(string fileName, string entryName, bool useFileSystem); ZipEntry MakeDirectoryEntry(string directoryName); ZipEntry MakeDirectoryEntry(string directoryName, bool useFileSystem); } public class WindowsNameTransform : INameTransform { private const int MaxPath = 260; private string _baseDirectory; private bool _trimIncomingPaths; private char _replacementChar = '_'; private bool _allowParentTraversal; private static readonly char[] InvalidEntryChars = new char[39] { '"', '<', '>', '|', '\0', '\u0001', '\u0002', '\u0003', '\u0004', '\u0005', '\u0006', '\a', '\b', '\t', '\n', '\v', '\f', '\r', '\u000e', '\u000f', '\u0010', '\u0011', '\u0012', '\u0013', '\u0014', '\u0015', '\u0016', '\u0017', '\u0018', '\u0019', '\u001a', '\u001b', '\u001c', '\u001d', '\u001e', '\u001f', '*', '?', ':' }; public string BaseDirectory { get { return _baseDirectory; } set { if (value == null) { throw new ArgumentNullException("value"); } _baseDirectory = Path.GetFullPath(value); } } public bool AllowParentTraversal { get { return _allowParentTraversal; } set { _allowParentTraversal = value; } } public bool TrimIncomingPaths { get { return _trimIncomingPaths; } set { _trimIncomingPaths = value; } } public char Replacement { get { return _replacementChar; } set { for (int i = 0; i < InvalidEntryChars.Length; i++) { if (InvalidEntryChars[i] == value) { throw new ArgumentException("invalid path character"); } } if (value == Path.DirectorySeparatorChar || value == Path.AltDirectorySeparatorChar) { throw new ArgumentException("invalid replacement character"); } _replacementChar = value; } } public WindowsNameTransform(string baseDirectory, bool allowParentTraversal = false) { BaseDirectory = baseDirectory ?? throw new ArgumentNullException("baseDirectory", "Directory name is invalid"); AllowParentTraversal = allowParentTraversal; } public WindowsNameTransform() { } public string TransformDirectory(string name) { name = TransformFile(name); if (name.Length > 0) { while (true) { string text = name; char directorySeparatorChar = Path.DirectorySeparatorChar; if (text.EndsWith(directorySeparatorChar.ToString(), StringComparison.Ordinal)) { name = name.Remove(name.Length - 1, 1); continue; } break; } return name; } throw new InvalidNameException("Cannot have an empty directory name"); } public string TransformFile(string name) { if (name != null) { name = MakeValidName(name, _replacementChar); if (_trimIncomingPaths) { name = Path.GetFileName(name); } if (_baseDirectory != null) { name = Path.Combine(_baseDirectory, name); string text = Path.GetFullPath(_baseDirectory); if (text[text.Length - 1] != Path.DirectorySeparatorChar) { string text2 = text; char directorySeparatorChar = Path.DirectorySeparatorChar; text = text2 + directorySeparatorChar; } if (!_allowParentTraversal && !Path.GetFullPath(name).StartsWith(text, StringComparison.InvariantCultureIgnoreCase)) { throw new InvalidNameException("Parent traversal in paths is not allowed"); } } } else { name = string.Empty; } return name; } public static bool IsValidName(string name) { if (name != null && name.Length <= 260) { return string.Compare(name, MakeValidName(name, '_'), StringComparison.Ordinal) == 0; } return false; } public static string MakeValidName(string name, char replacement) { if (name == null) { throw new ArgumentNullException("name"); } string text = name; char directorySeparatorChar = Path.DirectorySeparatorChar; name = PathUtils.DropPathRoot(text.Replace("/", directorySeparatorChar.ToString())); while (name.Length > 0 && name[0] == Path.DirectorySeparatorChar) { name = name.Remove(0, 1); } while (name.Length > 0 && name[name.Length - 1] == Path.DirectorySeparatorChar) { name = name.Remove(name.Length - 1, 1); } int num; for (num = name.IndexOf(string.Format("{0}{0}", Path.DirectorySeparatorChar), StringComparison.Ordinal); num >= 0; num = name.IndexOf(string.Format("{0}{0}", Path.DirectorySeparatorChar), StringComparison.Ordinal)) { name = name.Remove(num, 1); } num = name.IndexOfAny(InvalidEntryChars); if (num >= 0) { StringBuilder stringBuilder = new StringBuilder(name); while (num >= 0) { stringBuilder[num] = replacement; num = ((num < name.Length) ? name.IndexOfAny(InvalidEntryChars, num + 1) : (-1)); } name = stringBuilder.ToString(); } if (name.Length > 260) { throw new PathTooLongException(); } return name; } } public enum UseZip64 { Off, On, Dynamic } public enum CompressionMethod { Stored = 0, Deflated = 8, Deflate64 = 9, BZip2 = 12, LZMA = 14, PPMd = 98, WinZipAES = 99 } public enum EncryptionAlgorithm { None = 0, PkzipClassic = 1, Des = 26113, RC2 = 26114, TripleDes168 = 26115, TripleDes112 = 26121, Aes128 = 26126, Aes192 = 26127, Aes256 = 26128, RC2Corrected = 26370, Blowfish = 26400, Twofish = 26401, RC4 = 26625, Unknown = 65535 } [Flags] public enum GeneralBitFlags { Encrypted = 1, Method = 6, Descriptor = 8, ReservedPKware4 = 0x10, Patched = 0x20, StrongEncryption = 0x40, Unused7 = 0x80, Unused8 = 0x100, Unused9 = 0x200, Unused10 = 0x400, UnicodeText = 0x800, EnhancedCompress = 0x1000, HeaderMasked = 0x2000, ReservedPkware14 = 0x4000, ReservedPkware15 = 0x8000 } public static class GeneralBitFlagsExtensions { public static bool Includes(this GeneralBitFlags flagData, GeneralBitFlags flag) { return (flag & flagData) != 0; } } public static class ZipConstants { public const int VersionMadeBy = 51; [Obsolete("Use VersionMadeBy instead")] public const int VERSION_MADE_BY = 51; public const int VersionStrongEncryption = 50; [Obsolete("Use VersionStrongEncryption instead")] public const int VERSION_STRONG_ENCRYPTION = 50; public const int VERSION_AES = 51; public const int VersionZip64 = 45; public const int VersionBZip2 = 46; public const int LocalHeaderBaseSize = 30; [Obsolete("Use LocalHeaderBaseSize instead")] public const int LOCHDR = 30; public const int Zip64DataDescriptorSize = 24; public const int DataDescriptorSize = 16; [Obsolete("Use DataDescriptorSize instead")] public const int EXTHDR = 16; public const int CentralHeaderBaseSize = 46; [Obsolete("Use CentralHeaderBaseSize instead")] public const int CENHDR = 46; public const int EndOfCentralRecordBaseSize = 22; [Obsolete("Use EndOfCentralRecordBaseSize instead")] public const int ENDHDR = 22; public const int CryptoHeaderSize = 12; [Obsolete("Use CryptoHeaderSize instead")] public const int CRYPTO_HEADER_SIZE = 12; public const int Zip64EndOfCentralDirectoryLocatorSize = 20; public const int LocalHeaderSignature = 67324752; [Obsolete("Use LocalHeaderSignature instead")] public const int LOCSIG = 67324752; public const int SpanningSignature = 134695760; [Obsolete("Use SpanningSignature instead")] public const int SPANNINGSIG = 134695760; public const int SpanningTempSignature = 808471376; [Obsolete("Use SpanningTempSignature instead")] public const int SPANTEMPSIG = 808471376; public const int DataDescriptorSignature = 134695760; [Obsolete("Use DataDescriptorSignature instead")] public const int EXTSIG = 134695760; [Obsolete("Use CentralHeaderSignature instead")] public const int CENSIG = 33639248; public const int CentralHeaderSignature = 33639248; public const int Zip64CentralFileHeaderSignature = 101075792; [Obsolete("Use Zip64CentralFileHeaderSignature instead")] public const int CENSIG64 = 101075792; public const int Zip64CentralDirLocatorSignature = 117853008; public const int ArchiveExtraDataSignature = 117853008; public const int CentralHeaderDigitalSignature = 84233040; [Obsolete("Use CentralHeaderDigitalSignaure instead")] public const int CENDIGITALSIG = 84233040; public const int EndOfCentralDirectorySignature = 101010256; [Obsolete("Use EndOfCentralDirectorySignature instead")] public const int ENDSIG = 101010256; } public static class GenericBitFlagsExtensions { public static bool HasAny(this GeneralBitFlags target, GeneralBitFlags flags) { return (target & flags) != 0; } public static bool HasAll(this GeneralBitFlags target, GeneralBitFlags flags) { return (target & flags) == flags; } } public enum ZipEncryptionMethod { None, ZipCrypto, AES128, AES256 } public enum HostSystemID { Msdos = 0, Amiga = 1, OpenVms = 2, Unix = 3, VMCms = 4, AtariST = 5, OS2 = 6, Macintosh = 7, ZSystem = 8, Cpm = 9, WindowsNT = 10, MVS = 11, Vse = 12, AcornRisc = 13, Vfat = 14, AlternateMvs = 15, BeOS = 16, Tandem = 17, OS400 = 18, OSX = 19, WinZipAES = 99 } public class ZipEntry { [Flags] private enum Known : byte { None = 0, Size = 1, CompressedSize = 2, Crc = 4, Time = 8, ExternalAttributes = 0x10 } private Known known; private int externalFileAttributes = -1; private ushort versionMadeBy; private string name; private ulong size; private ulong compressedSize; private ushort versionToExtract; private uint crc; private DateTime dateTime; private CompressionMethod method = CompressionMethod.Deflated; private byte[] extra; private string comment; private int flags; private long zipFileIndex = -1L; private long offset; private bool forceZip64_; private byte cryptoCheckValue_; private int _aesVer; private int _aesEncryptionStrength; public bool HasCrc => (known & Known.Crc) != 0; public bool IsCrypted { get { return this.HasFlag(GeneralBitFlags.Encrypted); } set { this.SetFlag(GeneralBitFlags.Encrypted, value); } } public bool IsUnicodeText { get { return this.HasFlag(GeneralBitFlags.UnicodeText); } set { this.SetFlag(GeneralBitFlags.UnicodeText, value); } } internal byte CryptoCheckValue { get { return cryptoCheckValue_; } set { cryptoCheckValue_ = value; } } public int Flags { get { return flags; } set { flags = value; } } public long ZipFileIndex { get { return zipFileIndex; } set { zipFileIndex = value; } } public long Offset { get { return offset; } set { offset = value; } } public int ExternalFileAttributes { get { if ((known & Known.ExternalAttributes) != Known.None) { return externalFileAttributes; } return -1; } set { externalFileAttributes = value; known |= Known.ExternalAttributes; } } public int VersionMadeBy => versionMadeBy & 0xFF; public bool IsDOSEntry { get { if (HostSystem != 0) { return HostSystem == 10; } return true; } } public int HostSystem { get { return (versionMadeBy >> 8) & 0xFF; } set { versionMadeBy &= 255; versionMadeBy |= (ushort)((value & 0xFF) << 8); } } public int Version { get { if (versionToExtract != 0) { return versionToExtract & 0xFF; } if (AESKeySize > 0) { return 51; } if (CompressionMethod.BZip2 == method) { return 46; } if (CentralHeaderRequiresZip64) { return 45; } if (CompressionMethod.Deflated == method || IsDirectory || IsCrypted) { return 20; } if (HasDosAttributes(8)) { return 11; } return 10; } } public bool CanDecompress { get { if (Version <= 51 && (Version == 10 || Version == 11 || Version == 20 || Version == 45 || Version == 46 || Version == 51)) { return IsCompressionMethodSupported(); } return false; } } public bool LocalHeaderRequiresZip64 { get { bool flag = forceZip64_; if (!flag) { ulong num = compressedSize; if (versionToExtract == 0 && IsCrypted) { num += (ulong)EncryptionOverheadSize; } flag = (size >= uint.MaxValue || num >= uint.MaxValue) && (versionToExtract == 0 || versionToExtract >= 45); } return flag; } } public bool CentralHeaderRequiresZip64 { get { if (!LocalHeaderRequiresZip64) { return offset >= uint.MaxValue; } return true; } } public long DosTime { get { if ((known & Known.Time) == 0) { return 0L; } uint num = (uint)DateTime.Year; uint num2 = (uint)DateTime.Month; uint num3 = (uint)DateTime.Day; uint num4 = (uint)DateTime.Hour; uint num5 = (uint)DateTime.Minute; uint num6 = (uint)DateTime.Second; if (num < 1980) { num = 1980u; num2 = 1u; num3 = 1u; num4 = 0u; num5 = 0u; num6 = 0u; } else if (num > 2107) { num = 2107u; num2 = 12u; num3 = 31u; num4 = 23u; num5 = 59u; num6 = 59u; } return (((num - 1980) & 0x7F) << 25) | (num2 << 21) | (num3 << 16) | (num4 << 11) | (num5 << 5) | (num6 >> 1); } set { uint num = (uint)value; uint second = Math.Min(59u, 2 * (num & 0x1F)); uint minute = Math.Min(59u, (num >> 5) & 0x3F); uint hour = Math.Min(23u, (num >> 11) & 0x1F); uint month = Math.Max(1u, Math.Min(12u, (uint)((int)(value >> 21) & 0xF))); uint year = ((num >> 25) & 0x7F) + 1980; int day = Math.Max(1, Math.Min(DateTime.DaysInMonth((int)year, (int)month), (int)((value >> 16) & 0x1F))); DateTime = new DateTime((int)year, (int)month, day, (int)hour, (int)minute, (int)second, DateTimeKind.Unspecified); } } public DateTime DateTime { get { return dateTime; } set { dateTime = value; known |= Known.Time; } } public string Name { get { return name; } internal set { name = value; } } public long Size { get { if ((known & Known.Size) == 0) { return -1L; } return (long)size; } set { size = (ulong)value; known |= Known.Size; } } public long CompressedSize { get { if ((known & Known.CompressedSize) == 0) { return -1L; } return (long)compressedSize; } set { compressedSize = (ulong)value; known |= Known.CompressedSize; } } public long Crc { get { if ((known & Known.Crc) == 0) { return -1L; } return (long)crc & 0xFFFFFFFFL; } set { if ((crc & -4294967296L) != 0L) { throw new ArgumentOutOfRangeException("value"); } crc = (uint)value; known |= Known.Crc; } } public CompressionMethod CompressionMethod { get { return method; } set { method = value; } } internal CompressionMethod CompressionMethodForHeader { get { if (AESKeySize <= 0) { return method; } return CompressionMethod.WinZipAES; } } public byte[] ExtraData { get { return extra; } set { if (value == null) { extra = null; return; } if (value.Length > 65535) { throw new ArgumentOutOfRangeException("value"); } extra = new byte[value.Length]; Array.Copy(value, 0, extra, 0, value.Length); } } public int AESKeySize { get { return _aesEncryptionStrength switch { 0 => 0, 1 => 128, 2 => 192, 3 => 256, _ => throw new ZipException("Invalid AESEncryptionStrength " + _aesEncryptionStrength), }; } set { switch (value) { case 0: _aesEncryptionStrength = 0; break; case 128: _aesEncryptionStrength = 1; break; case 256: _aesEncryptionStrength = 3; break; default: throw new ZipException("AESKeySize must be 0, 128 or 256: " + value); } } } internal byte AESEncryptionStrength => (byte)_aesEncryptionStrength; internal int AESSaltLen => AESKeySize / 16; internal int AESOverheadSize => 12 + AESSaltLen; internal int EncryptionOverheadSize { get { if (IsCrypted) { if (_aesEncryptionStrength != 0) { return AESOverheadSize; } return 12; } return 0; } } public string Comment { get { return comment; } set { if (value != null && value.Length > 65535) { throw new ArgumentOutOfRangeException("value", "cannot exceed 65535"); } comment = value; } } public bool IsDirectory { get { if (name.Length <= 0 || (name[name.Length - 1] != '/' && name[name.Length - 1] != '\\')) { return HasDosAttributes(16); } return true; } } public bool IsFile { get { if (!IsDirectory) { return !HasDosAttributes(8); } return false; } } public ZipEntry(string name) : this(name, 0, 51, CompressionMethod.Deflated, unicode: true) { } internal ZipEntry(string name, int versionRequiredToExtract) : this(name, versionRequiredToExtract, 51, CompressionMethod.Deflated, unicode: true) { } internal ZipEntry(string name, int versionRequiredToExtract, int madeByInfo, CompressionMethod method, bool unicode) { if (name == null) { throw new ArgumentNullException("name"); } if (name.Length > 65535) { throw new ArgumentException("Name is too long", "name"); } if (versionRequiredToExtract != 0 && versionRequiredToExtract < 10) { throw new ArgumentOutOfRangeException("versionRequiredToExtract"); } DateTime = DateTime.Now; this.name = name; versionMadeBy = (ushort)madeByInfo; versionToExtract = (ushort)versionRequiredToExtract; this.method = method; IsUnicodeText = unicode; } [Obsolete("Use Clone instead")] public ZipEntry(ZipEntry entry) { if (entry == null) { throw new ArgumentNullException("entry"); } known = entry.known; name = entry.name; size = entry.size; compressedSize = entry.compressedSize; crc = entry.crc; dateTime = entry.DateTime; method = entry.method; comment = entry.comment; versionToExtract = entry.versionToExtract; versionMadeBy = entry.versionMadeBy; externalFileAttributes = entry.externalFileAttributes; flags = entry.flags; zipFileIndex = entry.zipFileIndex; offset = entry.offset; forceZip64_ = entry.forceZip64_; if (entry.extra != null) { extra = new byte[entry.extra.Length]; Array.Copy(entry.extra, 0, extra, 0, entry.extra.Length); } } private bool HasDosAttributes(int attributes) { bool flag = false; if ((known & Known.ExternalAttributes) != Known.None) { flag |= (HostSystem == 0 || HostSystem == 10) && (ExternalFileAttributes & attributes) == attributes; } return flag; } public void ForceZip64() { forceZip64_ = true; } public bool IsZip64Forced() { return forceZip64_; } internal void ProcessExtraData(bool localHeader) { ZipExtraData zipExtraData = new ZipExtraData(extra); if (zipExtraData.Find(1)) { forceZip64_ = true; if (zipExtraData.ValueLength < 4) { throw new ZipException("Extra data extended Zip64 information length is invalid"); } if (size == uint.MaxValue) { size = (ulong)zipExtraData.ReadLong(); } if (compressedSize == uint.MaxValue) { compressedSize = (ulong)zipExtraData.ReadLong(); } if (!localHeader && offset == uint.MaxValue) { offset = zipExtraData.ReadLong(); } } else if ((versionToExtract & 0xFF) >= 45 && (size == uint.MaxValue || compressedSize == uint.MaxValue)) { throw new ZipException("Zip64 Extended information required but is missing."); } DateTime = GetDateTime(zipExtraData) ?? DateTime; if (method == CompressionMethod.WinZipAES) { ProcessAESExtraData(zipExtraData); } } private static DateTime? GetDateTime(ZipExtraData extraData) { ExtendedUnixData data = extraData.GetData<ExtendedUnixData>(); if (data != null && data.Include.HasFlag(ExtendedUnixData.Flags.ModificationTime)) { return data.ModificationTime; } return null; } private void ProcessAESExtraData(ZipExtraData extraData) { if (extraData.Find(39169)) { versionToExtract = 51; int valueLength = extraData.ValueLength; if (valueLength < 7) { throw new ZipException("AES Extra Data Length " + valueLength + " invalid."); } int aesVer = extraData.ReadShort(); extraData.ReadShort(); int aesEncryptionStrength = extraData.ReadByte(); int num = extraData.ReadShort(); _aesVer = aesVer; _aesEncryptionStrength = aesEncryptionStrength; method = (CompressionMethod)num; return; } throw new ZipException("AES Extra Data missing"); } public bool IsCompressionMethodSupported() { return IsCompressionMethodSupported(CompressionMethod); } public object Clone() { ZipEntry zipEntry = (ZipEntry)MemberwiseClone(); if (extra != null) { zipEntry.extra = new byte[extra.Length]; Array.Copy(extra, 0, zipEntry.extra, 0, extra.Length); } return zipEntry; } public override string ToString() { return name; } public static bool IsCompressionMethodSupported(CompressionMethod method) { if (method != CompressionMethod.Deflated && method != CompressionMethod.Stored) { return method == CompressionMethod.BZip2; } return true; } public static string CleanName(string name) { if (name == null) { return string.Empty; } if (Path.IsPathRooted(name)) { name = name.Substring(Path.GetPathRoot(name).Length); } name = name.Replace("\\", "/"); while (name.Length > 0 && name[0] == '/') { name = name.Remove(0, 1); } return name; } } public static class ZipEntryExtensions { public static bool HasFlag(this ZipEntry entry, GeneralBitFlags flag) { return ((uint)entry.Flags & (uint)flag) != 0; } public static void SetFlag(this ZipEntry entry, GeneralBitFlags flag, bool enabled = true) { entry.Flags = (enabled ? (entry.Flags | (int)flag) : (entry.Flags & (int)(~flag))); } } public class ZipEntryFactory : IEntryFactory { public enum TimeSetting { LastWriteTime, LastWriteTimeUtc, CreateTime, CreateTimeUtc, LastAccessTime, LastAccessTimeUtc, Fixed } private INameTransform nameTransform_; private DateTime fixedDateTime_ = DateTime.Now; private TimeSetting timeSetting_; private bool isUnicodeText_; private int getAttributes_ = -1; private int setAttributes_; public INameTransform NameTransform { get { return nameTransform_; } set { if (value == null) { nameTransform_ = new ZipNameTransform(); } else { nameTransform_ = value; } } } public TimeSetting Setting { get { return timeSetting_; } set { timeSetting_ = value; } } public DateTime FixedDateTime { get { return fixedDateTime_; } set { if (value.Year < 1970) { throw new ArgumentException("Value is too old to be valid", "value"); } fixedDateTime_ = value; } } public int GetAttributes { get { return getAttributes_; } set { getAttributes_ = value; } } public int SetAttributes { get { return setAttributes_; } set { setAttributes_ = value; } } public bool IsUnicodeText { get { return isUnicodeText_; } set { isUnicodeText_ = value; } } public ZipEntryFactory() { nameTransform_ = new ZipNameTransform(); isUnicodeText_ = true; } public ZipEntryFactory(TimeSetting timeSetting) : this() { timeSetting_ = timeSetting; } public ZipEntryFactory(DateTime time) : this() { timeSetting_ = TimeSetting.Fixed; FixedDateTime = time; } public ZipEntry MakeFileEntry(string fileName) { return MakeFileEntry(fileName, null, useFileSystem: true); } public ZipEntry MakeFileEntry(string fileName, bool useFileSystem) { return MakeFileEntry(fileName, null, useFileSystem); } public ZipEntry MakeFileEntry(string fileName, string entryName, bool useFileSystem) { ZipEntry zipEntry = new ZipEntry(nameTransform_.TransformFile((!string.IsNullOrEmpty(entryName)) ? entryName : fileName)); zipEntry.IsUnicodeText = isUnicodeText_; int num = 0; bool flag = setAttributes_ != 0; FileInfo fileInfo = null; if (useFileSystem) { fileInfo = new FileInfo(fileName); } if (fileInfo != null && fileInfo.Exists) { switch (timeSetting_) { case TimeSetting.CreateTime: zipEntry.DateTime = fileInfo.CreationTime; break; case TimeSetting.CreateTimeUtc: zipEntry.DateTime = fileInfo.CreationTimeUtc; break; case TimeSetting.LastAccessTime: zipEntry.DateTime = fileInfo.LastAccessTime; break; case TimeSetting.LastAccessTimeUtc: zipEntry.DateTime = fileInfo.LastAccessTimeUtc; break; case TimeSetting.LastWriteTime: zipEntry.DateTime = fileInfo.LastWriteTime; break; case TimeSetting.LastWriteTimeUtc: zipEntry.DateTime = fileInfo.LastWriteTimeUtc; break; case TimeSetting.Fixed: zipEntry.DateTime = fixedDateTime_; break; default: throw new ZipException("Unhandled time setting in MakeFileEntry"); } zipEntry.Size = fileInfo.Length; flag = true; num = (int)fileInfo.Attributes & getAttributes_; } else if (timeSetting_ == TimeSetting.Fixed) { zipEntry.DateTime = fixedDateTime_; } if (flag) { num |= setAttributes_; zipEntry.ExternalFileAttributes = num; } return zipEntry; } public ZipEntry MakeDirectoryEntry(string directoryName) { return MakeDirectoryEntry(directoryName, useFileSystem: true); } public ZipEntry MakeDirectoryEntry(string directoryName, bool useFileSystem) { ZipEntry zipEntry = new ZipEntry(nameTransform_.TransformDirectory(directoryName)); zipEntry.IsUnicodeText = isUnicodeText_; zipEntry.Size = 0L; int num = 0; DirectoryInfo directoryInfo = null; if (useFileSystem) { directoryInfo = new DirectoryInfo(directoryName); } if (directoryInfo != null && directoryInfo.Exists) { switch (timeSetting_) { case TimeSetting.CreateTime: zipEntry.DateTime = directoryInfo.CreationTime; break; case TimeSetting.CreateTimeUtc: zipEntry.DateTime = directoryInfo.CreationTimeUtc; break; case TimeSetting.LastAccessTime: zipEntry.DateTime = directoryInfo.LastAccessTime; break; case TimeSetting.LastAccessTimeUtc: zipEntry.DateTime = directoryInfo.LastAccessTimeUtc; break; case TimeSetting.LastWriteTime: zipEntry.DateTime = directoryInfo.LastWriteTime; break; case TimeSetting.LastWriteTimeUtc: zipEntry.DateTime = directoryInfo.LastWriteTimeUtc; break; case TimeSetting.Fixed: zipEntry.DateTime = fixedDateTime_; break; default: throw new ZipException("Unhandled time setting in MakeDirectoryEntry"); } num = (int)directoryInfo.Attributes & getAttributes_; } else if (timeSetting_ == TimeSetting.Fixed) { zipEntry.DateTime = fixedDateTime_; } num |= setAttributes_ | 0x10; zipEntry.ExternalFileAttributes = num; return zipEntry; } } [Serializable] public class ZipException : SharpZipBaseException { public ZipException() { } public ZipException(string message) : base(message) { } public ZipException(string message, Exception innerException) : base(message, innerException) { } protected ZipException(SerializationInfo info, StreamingContext context) : base(info, context) { } } public interface ITaggedData { ushort TagID { get; } void SetData(byte[] data, int offset, int count); byte[] GetData(); } public class RawTaggedData : ITaggedData { private ushort _tag; private byte[] _data; public ushort TagID { get { return _tag; } set { _tag = value; } } public byte[] Data { get { return _data; } set { _data = value; } } public RawTaggedData(ushort tag) { _tag = tag; } public void SetData(byte[] data, int offset, int count) { if (data == null) { throw new ArgumentNullException("data"); } _data = new byte[count]; Array.Copy(data, offset, _data, 0, count); } public byte[] GetData() { return _data; } } public class ExtendedUnixData : ITaggedData { [Flags] public enum Flags : byte { ModificationTime = 1, AccessTime = 2, CreateTime = 4 } private Flags _flags; private DateTime _modificationTime = new DateTime(1970, 1, 1); private DateTime _lastAccessTime = new DateTime(1970, 1, 1); private DateTime _createTime = new DateTime(1970, 1, 1); public ushort TagID => 21589; public DateTime ModificationTime { get { return _modificationTime; } set { if (!IsValidValue(value)) { throw new ArgumentOutOfRangeException("value"); } _flags |= Flags.ModificationTime; _modificationTime = value; } } public DateTime AccessTime { get { return _lastAccessTime; } set { if (!IsValidValue(value)) { throw new ArgumentOutOfRangeException("value"); } _flags |= Flags.AccessTime; _lastAccessTime = value; } } public DateTime CreateTime { get { return _createTime; } set { if (!IsValidValue(value)) { throw new ArgumentOutOfRangeException("value"); } _flags |= Flags.CreateTime; _createTime = value; } } public Flags Include { get { return _flags; } set { _flags = value; } } public void SetData(byte[] data, int index, int count) { using MemoryStream memoryStream = new MemoryStream(data, index, count, writable: false); _flags = (Flags)memoryStream.ReadByte(); if ((_flags & Flags.ModificationTime) != 0) { int seconds = memoryStream.ReadLEInt(); _modificationTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc) + new TimeSpan(0, 0, 0, seconds, 0); if (count <= 5) { return; } } if ((_flags & Flags.AccessTime) != 0) { int seconds2 = memoryStream.ReadLEInt(); _lastAccessTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc) + new TimeSpan(0, 0, 0, seconds2, 0); } if ((_flags & Flags.CreateTime) != 0) { int seconds3 = memoryStream.ReadLEInt(); _createTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc) + new TimeSpan(0, 0, 0, seconds3, 0); } } public byte[] GetData() { using MemoryStream memoryStream = new MemoryStream(); memoryStream.WriteByte((byte)_flags); if ((_flags & Flags.ModificationTime) != 0) { int value = (int)(_modificationTime - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds; memoryStream.WriteLEInt(value); } if ((_flags & Flags.AccessTime) != 0) { int value2 = (int)(_lastAccessTime - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds; memoryStream.WriteLEInt(value2); } if ((_flags & Flags.CreateTime) != 0) { int value3 = (int)(_createTime - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds; memoryStream.WriteLEInt(value3); } return memoryStream.ToArray(); } public static bool IsValidValue(DateTime value) { if (!(value >= new DateTime(1901, 12, 13, 20, 45, 52))) { return value <= new DateTime(2038, 1, 19, 3, 14, 7); } return true; } } public class NTTaggedData : ITaggedData { private DateTime _lastAccessTime = DateTime.FromFileTimeUtc(0L); private DateTime _lastModificationTime = DateTime.FromFileTimeUtc(0L); private DateTime _createTime = DateTime.FromFileTimeUtc(0L); public ushort TagID => 10; public DateTime LastModificationTime { get { return _lastModificationTime; } set { if (!IsValidValue(value)) { throw new ArgumentOutOfRangeException("value"); } _lastModificationTime = value; } } public DateTime CreateTime { get { return _createTime; } set { if (!IsValidValue(value)) { throw new ArgumentOutOfRangeException("value"); } _createTime = value; } } public DateTime LastAccessTime { get { return _lastAccessTime; } set { if (!IsValidValue(value)) { throw new ArgumentOutOfRangeException("value"); } _lastAccessTime = value; } } public void SetData(byte[] data, int index, int count) { using MemoryStream memoryStream = new MemoryStream(data, index, count, writable: false); memoryStream.ReadLEInt(); while (memoryStream.Position < memoryStream.Length) { int num = memoryStream.ReadLEShort(); int num2 = memoryStream.ReadLEShort(); if (num == 1) { if (num2 >= 24) { long fileTime = memoryStream.ReadLELong(); _lastModificationTime = DateTime.FromFileTimeUtc(fileTime); long fileTime2 = memoryStream.ReadLELong(); _lastAccessTime = DateTime.FromFileTimeUtc(fileTime2); long fileTime3 = memoryStream.ReadLELong(); _createTime = DateTime.FromFileTimeUtc(fileTime3); } break; } memoryStream.Seek(num2, SeekOrigin.Current); } } public byte[] GetData() { using MemoryStream memoryStream = new MemoryStream(); memoryStream.WriteLEInt(0); memoryStream.WriteLEShort(1); memoryStream.WriteLEShort(24); memoryStream.WriteLELong(_lastModificationTime.ToFileTimeUtc()); memoryStream.WriteLELong(_lastAccessTime.ToFileTimeUtc()); memoryStream.WriteLELong(_createTime.ToFileTimeUtc()); return memoryStream.ToArray(); } public static bool IsValidValue(DateTime value) { bool result = true; try { value.ToFileTimeUtc(); } catch { result = false; } return result; } } internal interface ITaggedDataFactory { ITaggedData Create(short tag, byte[] data, int offset, int count); } public sealed class ZipExtraData : IDisposable { private int _index; private int _readValueStart; private int _readValueLength; private MemoryStream _newEntry; private byte[] _data; public int Length => _data.Length; public int ValueLength => _readValueLength; public int CurrentReadIndex => _index; public int UnreadCount { get { if (_readValueStart > _data.Length || _readValueStart < 4) { throw new ZipException("Find must be called before calling a Read method"); } return _readValueStart + _readValueLength - _index; } } public ZipExtraData() { Clear(); } public ZipExtraData(byte[] data) { if (data == null) { _data = Empty.Array<byte>(); } else { _data = data; } } public byte[] GetEntryData() { if (Length > 65535) { throw new ZipException("Data exceeds maximum length"); } return (byte[])_data.Clone(); } public void Clear() { if (_data == null || _data.Length != 0) { _data = Empty.Array<byte>(); } } public Stream GetStreamForTag(int tag) { Stream result = null; if (Find(tag)) { result = new MemoryStream(_data, _index, _readValueLength, writable: false); } return result; } public T GetData<T>() where T : class, ITaggedData, new() { T val = new T(); if (Find(val.TagID)) { val.SetData(_data, _readValueStart, _readValueLength); return val; } return null; } public bool Find(int headerID) { _readValueStart = _data.Length; _readValueLength = 0; _index = 0; int num = _readValueStart; int num2 = headerID - 1; while (num2 != headerID && _index < _data.Length - 3) { num2 = ReadShortInternal(); num = ReadShortInternal(); if (num2 != headerID) { _index += num; } } int num3; if (num2 == headerID) { num3 = ((_index + num <= _data.Length) ? 1 : 0); if (num3 != 0) { _readValueStart = _index; _readValueLength = num; } } else { num3 = 0; } return (byte)num3 != 0; } public void AddEntry(ITaggedData taggedData) { if (taggedData == null) { throw new ArgumentNullException("taggedData"); } AddEntry(taggedData.TagID, taggedData.GetData()); } public void AddEntry(int headerID, byte[] fieldData) { if (headerID > 65535 || headerID < 0) { throw new ArgumentOutOfRangeException("headerID"); } int num = ((fieldData != null) ? fieldData.Length : 0); if (num > 65535) { throw new ArgumentOutOfRangeException("fieldData", "exceeds maximum length"); } int num2 = _data.Length + num + 4; if (Find(headerID)) { num2 -= ValueLength + 4; } if (num2 > 65535) { throw new ZipException("Data exceeds maximum length"); } Delete(headerID); byte[] array = new byte[num2]; _data.CopyTo(array, 0); int index = _data.Length; _data = array; SetShort(ref index, headerID); SetShort(ref index, num); fieldData?.CopyTo(array, index); } public void StartNewEntry() { _newEntry = new MemoryStream(); } public void AddNewEntry(int headerID) { byte[] fieldData = _newEntry.ToArray(); _newEntry = null; AddEntry(headerID, fieldData); } public void AddData(byte data) { _newEntry.WriteByte(data); } public void AddData(byte[] data) { if (data == null) { throw new ArgumentNullException("data"); } _newEntry.Write(data, 0, data.Length); } public void AddLeShort(int toAdd) { _newEntry.WriteByte((byte)toAdd); _newEntry.WriteByte((byte)(toAdd >> 8)); } public void AddLeInt(int toAdd) { AddLeShort((short)toAdd); AddLeShort((short)(toAdd >> 16)); } public void AddLeLong(long toAdd) { AddLeInt((int)(toAdd & 0xFFFFFFFFu)); AddLeInt((int)(toAdd >> 32)); } public bool Delete(int headerID) { bool result = false; if (Find(headerID)) { result = true; int num = _readValueStart - 4; byte[] array = new byte[_data.Length - (ValueLength + 4)]; Array.Copy(_data, 0, array, 0, num); int num2 = num + ValueLength + 4; Array.Copy(_data, num2, array, num, _data.Length - num2); _data = array; } return result; } public long ReadLong() { ReadCheck(8); return (ReadInt() & 0xFFFFFFFFu) | ((long)ReadInt() << 32); } public int ReadInt() { ReadCheck(4); int result = _data[_index] + (_data[_index + 1] << 8) + (_data[_index + 2] << 16) + (_data[_index + 3] << 24); _index += 4; return result; } public int ReadShort() { ReadCheck(2); int result = _data[_index] + (_data[_index + 1] << 8); _index += 2; return result; } public int ReadByte() { int result = -1; if (_index < _data.Length && _readValueStart + _readValueLength > _index) { result = _data[_index]; _index++; } return result; } public void Skip(int amount) { ReadCheck(amount); _index += amount; } private void ReadCheck(int length) { if (_readValueStart > _data.Length || _readValueStart < 4) { throw new ZipException("Find must be called before calling a Read method"); } if (_index > _readValueStart + _readValueLength - length) { throw new ZipException("End of extra data"); } if (_index + length < 4) { throw new ZipException("Cannot read before start of tag"); } } private int ReadShortInternal() { if (_index > _data.Length - 2) { throw new ZipException("End of extra data"); } int result = _data[_index] + (_data[_index + 1] << 8); _index += 2; return result; } private void SetShort(ref int index, int source) { _data[index] = (byte)source; _data[index + 1] = (byte)(source >> 8); index += 2; } public void Dispose() { if (_newEntry != null) { _newEntry.Dispose(); } } } public class KeysRequiredEventArgs : EventArgs { private readonly string fileName; private byte[] key; public string FileName => fileName; public byte[] Key { get { return key; } set { key = value; } } public KeysRequiredEventArgs(string name) { fileName = name; } public KeysRequiredEventArgs(string name, byte[] keyValue) { fileName = name; key = keyValue; } } public enum TestStrategy { FindFirstError, FindAllErrors } public enum TestOperation { Initialising, EntryHeader, EntryData, EntryComplete, MiscellaneousTests, Complete } public class TestStatus { private readonly ZipFile file_; private ZipEntry entry_; private bool entryValid_; private int errorCount_; private long bytesTested_; private TestOperation operation_; public TestOperation Operation => operation_; public ZipFile File => file_; public ZipEntry Entry => entry_; public int ErrorCount => errorCount_; public long BytesTested => bytesTested_; public bool EntryValid => entryValid_; public TestStatus(ZipFile file) { file_ = file; } internal void AddError() { errorCount_++; entryValid_ = false; } internal void SetOperation(TestOperation operation) { operation_ = operation; } internal void SetEntry(ZipEntry entry) { entry_ = entry; entryValid_ = true; bytesTested_ = 0L; } internal void SetBytesTested(long value) { bytesTested_ = value; } } public delegate void ZipTestResultHandler(TestStatus status, string message); public enum FileUpdateMode { Safe, Direct } public class ZipFile : IEnumerable, IDisposable { public delegate void KeysRequiredEventHandler(object sender, KeysRequiredEventArgs e); [Flags] private enum HeaderTest { None = 0, Extract = 1, Header = 2 } private enum UpdateCommand { Copy, Modify, Add } private class UpdateComparer : IComparer<ZipUpdate> { public int Compare(ZipUpdate x, ZipUpdate y) { int num; if (x == null) { num = ((y != null) ? (-1) : 0); } else if (y == null) { num = 1; } else { int num2 = ((x.Command != UpdateCommand.Copy && x.Command != UpdateCommand.Modify) ? 1 : 0); int num3 = ((y.Command != UpdateCommand.Copy && y.Command != UpdateCommand.Modify) ? 1 : 0); num = num2 - num3; if (num == 0) { long num4 = x.Entry.Offset - y.Entry.Offset; num = ((num4 < 0) ? (-1) : ((num4 != 0L) ? 1 : 0)); } } return num; } } private class ZipUpdate { private ZipEntry entry_; private ZipEntry outEntry_; private readonly UpdateCommand command_; private IStaticDataSource dataSource_; private readonly string filename_; private long sizePatchOffset_ = -1L; private long crcPatchOffset_ = -1L; private long _offsetBasedSize = -1L; public ZipEntry Entry => entry_; public ZipEntry OutEntry { get { if (outEntry_ == null) { outEntry_ = (ZipEntry)entry_.Clone(); } return outEntry_; } } public UpdateCommand Command => command_; public string Filename => filename_; public long SizePatchOffset { get { return sizePatchOffset_; } set { sizePatchOffset_ = value; } } public long CrcPatchOffset { get { return crcPatchOffset_; } set { crcPatchOffset_ = value; } } public long OffsetBasedSize { get { return _offsetBasedSize; } set { _offsetBasedSize = value; } } public ZipUpdate(string fileName, ZipEntry entry) { command_ = UpdateCommand.Add; entry_ = entry; filename_ = fileName; } [Obsolete] public ZipUpdate(string fileName, string entryName, CompressionMethod compressionMethod) { command_ = UpdateCommand.Add; entry_ = new ZipEntry(entryName) { CompressionMethod = compressionMethod }; filename_ = fileName; } [Obsolete] public ZipUpdate(string fileName, string entryName) : this(fileName, entryName, CompressionMethod.Deflated) { } [Obsolete] public ZipUpdate(IStaticDataSource dataSource, string entryName, CompressionMethod compressionMethod) { command_ = UpdateCommand.Add; entry_ = new ZipEntry(entryName) { CompressionMethod = compressionMethod }; dataSource_ = dataSource; } public ZipUpdate(IStaticDataSource dataSource, ZipEntry entry) { command_ = UpdateCommand.Add; entry_ = entry; dataSource_ = dataSource; } public ZipUpdate(ZipEntry original, ZipEntry updated) { throw new ZipException("Modify not currently supported"); } public ZipUpdate(UpdateCommand command, ZipEntry entry) { command_ = command; entry_ = (ZipEntry)entry.Clone(); } public ZipUpdate(ZipEntry entry) : this(UpdateCommand.Copy, entry) { } public Stream GetSource() { Stream result = null; if (dataSource_ != null) { result = dataSource_.GetSource(); } return result; } } private class ZipString { private string comment_; private byte[] rawComment_; private readonly bool isSourceString_; private readonly Encoding _encoding; public bool IsSourceString => isSourceString_; public int RawLength { get { MakeBytesAvailable(); return rawComment_.Length; } } public byte[] RawComment { get { MakeBytesAvailable(); return (byte[])rawComment_.Clone(); } } public ZipString(string comment, Encoding encoding) { comment_ = comment; isSourceString_ = true; _encoding = encoding; } public ZipString(byte[] rawString, Encoding encoding) { rawComment_ = rawString; _encoding = encoding; } public void Reset() { if (isSourceString_) { rawComment_ = null; } else { comment_ = null; } } private void MakeTextAvailable() { if (comment_ == null) { comment_ = _encoding.GetString(rawComment_); } } private void MakeBytesAvailable() { if (rawComment_ == null) { rawComment_ = _encoding.GetBytes(comment_); } } public static implicit operator string(ZipString zipString) { zipString.MakeTextAvailable(); return zipString.comment_; } } private class ZipEntryEnumerator : IEnumerator { private ZipEntry[] array; private int index = -1; public object Current => array[index]; public ZipEntryEnumerator(ZipEntry[] entries) { array = entries; } public void Reset() { index = -1; } public bool MoveNext() { return ++index < array.Length; } } private class UncompressedStream : Stream { private readonly Stream baseStream_; public override bool CanRead => false; public override bool CanWrite => baseStream_.CanWrite; public override bool CanSeek => false; public override long Length => 0L; public override long Position { get { return baseStream_.Position; } set { throw new NotImplementedException(); } } public UncompressedStream(Stream baseStream) { baseStream_ = baseStream; } public override void Flush() { baseStream_.Flush(); } public override int Read(byte[] buffer, int offset, int count) { return 0; } public override long Seek(long offset, SeekOrigin origin) { return 0L; } public override void SetLength(long value) { } public override void Write(byte[] buffer, int offset, int count) { baseStream_.Write(buffer, offset, count); } } private class PartialInputStream : Stream { private ZipFile zipFile_; private Stream baseStream_; private readonly long start_; private readonly long length_; private long readPos_; private readonly long end_; public override long Position { get { return readPos_ - start_; } set { long num = start_ + value; if (num < start_) { throw new ArgumentException("Negative position is invalid"); } if (num > end_) { throw new InvalidOperationException("Cannot seek past end"); } readPos_ = num; } } public override long Length => length_; public override bool CanWrite => false; public override bool CanSeek => true; public override bool CanRead => true; public override bool CanTimeout => baseStream_.CanTimeout; public PartialInputStream(ZipFile zipFile, long start, long length) { start_ = start; length_ = length; zipFile_ = zipFile; baseStream_ = zipFile_.baseStream_; readPos_ = start; end_ = start + length; } public override int ReadByte() { if (readPos_ >= end_) { return -1; } lock (baseStream_) { baseStream_.Seek(readPos_++, SeekOrigin.Begin); return baseStream_.ReadByte(); } } public override int Read(byte[] buffer, int offset, int count) { lock (baseStream_) { if (count > end_ - readPos_) { count = (int)(end_ - readPos_); if (count == 0) { return 0; } } if (baseStream_.Position != readPos_) { baseStream_.Seek(readPos_, SeekOrigin.Begin); } int num = baseStream_.Read(buffer, offset, count); if (num > 0) { readPos_ += num; } return num; } } public override void Write(byte[] buffer, int offset, int count) { throw new NotSupportedException(); } public override void SetLength(long value) { throw new NotSupportedException(); } public override long Seek(long offset, SeekOrigin origin) { long num = readPos_; switch (origin) { case SeekOrigin.Begin: num = start_ + offset; break; case SeekOrigin.Current: num = readPos_ + offset; break; case SeekOrigin.End: num = end_ + offset; break; } if (num < start_) { throw new ArgumentException("Negative position is invalid"); } if (num > end_) { throw new IOException("Cannot seek past end"); } readPos_ = num; return readPos_; } public override void Flush() { } } public KeysRequiredEventHandler KeysRequired; private const int DefaultBufferSize = 4096; private bool isDisposed_; private string name_; private string comment_ = string.Empty; private string rawPassword_; private Stream baseStream_; private bool isStreamOwner; private long offsetOfFirstEntry; private ZipEntry[] entries_; private byte[] key; private bool isNewArchive_; private StringCodec _stringCodec = ZipStrings.GetStringCodec(); private UseZip64 useZip64_ = UseZip64.Dynamic; private List<ZipUpdate> updates_; private long updateCount_; private Dictionary<string, int> updateIndex_; private IArchiveStorage archiveStorage_; private IDynamicDataSource updateDataSource_; private bool contentsEdited_; private int bufferSize_ = 4096; private byte[] copyBuffer_; private ZipString newComment_; private bool commentEdited_; private IEntryFactory updateEntryFactory_ = new ZipEntryFactory(); private byte[] Key { get { return key; } set { key = value; } } public string Password { set { if (string.IsNullOrEmpty(value)) { key = null; } else { key = PkzipClassic.GenerateKeys(ZipCryptoEncoding.GetBytes(value)); } rawPassword_ = value; } } private bool HaveKeys => key != null; public bool IsStreamOwner { get { return isStreamOwner; } set { isStreamOwner = value; } } public bool IsEmbeddedArchive => offsetOfFirstEntry > 0; public bool IsNewArchive => isNewArchive_; public string ZipFileComment => comment_; public string Name => name_; [Obsolete("Use the Count property instead")] public int Size => entries_.Length; public long Count => entries_.Length; [IndexerName("EntryByIndex")] public ZipEntry this[int index] => (ZipEntry)entries_[index].Clone(); public Encoding ZipCryptoEncoding { get { return _stringCodec.ZipCryptoEncoding; } set { _stringCodec.ZipCryptoEncoding = value; } } public StringCodec StringCodec { get { return _stringCodec; } set { _stringCodec = value; } } public INameTransform NameTransform { get { return updateEntryFactory_.NameTransform; } set { updateEntryFactory_.NameTransform = value; } } public IEntryFactory EntryFactory { get { return updateEntryFactory_; } set { if (value == null) { updateEntryFactory_ = new ZipEntryFactory(); } else { updateEntryFactory_ = value; } } } public int BufferSize { get { return bufferSize_; } set { if (value < 1024) { throw new ArgumentOutOfRangeException("value", "cannot be below 1024"); } if (bufferSize_ != value) { bufferSize_ = value; copyBuffer_ = null; } } } public bool IsUpdating => updates_ != null; public UseZip64 UseZip64 { get { return useZip64_; } set { useZip64_ = value; } } public bool SkipLocalEntryTestsOnLocate { get; set; } private void OnKeysRequired(string fileName) { if (KeysRequired != null) { KeysRequiredEventArgs e = new KeysRequiredEventArgs(fileName, key); KeysRequired(this, e); key = e.Key; } } public ZipFile(string name, StringCodec stringCodec = null) { name_ = name ?? throw new ArgumentNullException("name"); baseStream_ = File.Open(name, FileMode.Open, FileAccess.Read, FileShare.Read); isStreamOwner = true; if (stringCodec != null) { _stringCodec = stringCodec; } try { ReadEntries(); } catch { DisposeInternal(disposing: true); throw; } } public ZipFile(FileStream file) : this(file, leaveOpen: false) { } public ZipFile(FileStream file, bool leaveOpen) { if (file == null) { throw new ArgumentNullException("file"); } if (!file.CanSeek) { throw new ArgumentException("Stream is not seekable", "file"); } baseStream_ = file; name_ = file.Name; isStreamOwner = !leaveOpen; try { ReadEntries(); } catch { DisposeInternal(disposing: true); throw; } } public ZipFile(Stream stream) : this(stream, leaveOpen: false) { } public ZipFile(Stream stream, bool leaveOpen) { if (stream == null) { throw new ArgumentNullException("stream"); } if (!stream.CanSeek) { throw new ArgumentException("Stream is not seekable", "stream"); } baseStream_ = stream; isStreamOwner = !leaveOpen; if (baseStream_.Length > 0) { try { ReadEntries(); return; } catch { DisposeInternal(disposing: true); throw; } } entries_ = Empty.Array<ZipEntry>(); isNewArchive_ = true; } internal ZipFile() { entries_ = Empty.Array<ZipEntry>(); isNewArchive_ = true; } ~ZipFile() { Dispose(disposing: false); } public void Close() { DisposeInternal(disposing: true); GC.SuppressFinalize(this); } public static ZipFile Create(string fileName) { if (fileName == null) { throw new ArgumentNullException("fileName"); } FileStream fileStream = File.Create(fileName); return new ZipFile { name_ = fileName, baseStream_ = fileStream, isStreamOwner = true }; } public static ZipFile Create(Stream outStream) { if (outStream == null) { throw new ArgumentNullException("outStream"); } if (!outStream.CanWrite) { throw new ArgumentException("Stream is not writeable", "outStream"); } if (!outStream.CanSeek) { throw new ArgumentException("Stream is not seekable", "outStream"); } return new ZipFile { baseStream_ = outStream }; } public IEnumerator GetEnumerator() { if (isDisposed_) { throw new ObjectDisposedException("ZipFile"); } return new ZipEntryEnumerator(entries_); } public int FindEntry(string name, bool ignoreCase) { if (isDisposed_) { throw new ObjectDisposedException("ZipFile"); } for (int i = 0; i < entries_.Length; i++) { if (string.Compare(name, entries_[i].Name, ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal) == 0) { return i; } } return -1; } public ZipEntry GetEntry(string name) { if (isDisposed_) { throw new ObjectDisposedException("ZipFile"); } int num = FindEntry(name, ignoreCase: true); if (num < 0) { return null; } return (ZipEntry)entries_[num].Clone(); } public Stream GetInputStream(ZipEntry entry) { if (entry == null) { throw new ArgumentNullException("entry"); } if (isDisposed_) { throw new ObjectDisposedException("ZipFile"); } long num = entry.ZipFileIndex; if (num < 0 || num >= entries_.Length || entries_[num].Name != entry.Name) { num = FindEntry(entry.Name, ignoreCase: true); if (num < 0) { throw new ZipException("Entry cannot be found"); } } return GetInputStream(num); } public Stream GetInputStream(long entryIndex) { if (isDisposed_) { throw new ObjectDisposedException("ZipFile"); } long start = LocateEntry(entries_[entryIndex]); CompressionMethod compressionMethod = entries_[entryIndex].CompressionMethod; Stream stream = new PartialInputStream(this, start, entries_[entryIndex].CompressedSize); if (entries_[entryIndex].IsCrypted) { stream = CreateAndInitDecryptionStream(stream, entries_[entryIndex]); if (stream == null) { throw new ZipException("Unable to decrypt this entry"); } } switch (compressionMethod) { case CompressionMethod.Deflated: stream = new InflaterInputStream(stream, new Inflater(noHeader: true)); break; case CompressionMethod.BZip2: stream = new BZip2InputStream(stream); break; default: throw new ZipException("Unsupported compression method " + compressionMethod); case CompressionMethod.Stored: break; } return stream; } public bool TestArchive(bool testData) { return TestArchive(testData, TestStrategy.FindFirstError, null); } public bool TestArchive(bool testData, TestStrategy strategy, ZipTestResultHandler resultHandler) { if (isDisposed_) { throw new ObjectDisposedException("ZipFile"); } TestStatus testStatus = new TestStatus(this); resultHandler?.Invoke(testStatus, null); HeaderTest tests = (testData ? (HeaderTest.Extract | HeaderTest.Header) : HeaderTest.Header); bool flag = true; try { int num = 0; while (flag && num < Count) { if (resultHandler != null) { testStatus.SetEntry(this[num]); testStatus.SetOperation(TestOperation.EntryHeader); resultHandler(testStatus, null); } try { TestLocalHeader(this[num], tests); } catch (ZipException ex) { testStatus.AddError(); resultHandler?.Invoke(testStatus, "Exception during test - '" + ex.Message + "'"); flag = flag && strategy != TestStrategy.FindFirstError; } if (flag && testData && this[num].IsFile) { bool flag2 = this[num].AESKeySize == 0; if (resultHandler != null) { testStatus.SetOperation(TestOperation.EntryData); resultHandler(testStatus, null); } Crc32 crc = new Crc32(); using (Stream stream = GetInputStream(this[num])) { byte[] array = new byte[4096]; long num2 = 0L; int num3; while ((num3 = stream.Read(array, 0, array.Length)) > 0) { if (flag2) { crc.Update(new ArraySegment<byte>(array, 0, num3)); } if (resultHandler != null) { num2 += num3; testStatus.SetBytesTested(num2); resultHandler(testStatus, null); } } } if (flag2 && this[num].Crc != crc.Value) { testStatus.AddError(); resultHandler?.Invoke(testStatus, "CRC mismatch"); flag = flag && strategy != TestStrategy.FindFirstError; } if ((this[num].Flags & 8) != 0) { DescriptorData descriptorData = new DescriptorData(); ZipFormat.ReadDataDescriptor(baseStream_, this[num].LocalHeaderRequiresZip64, descriptorData); if (flag2 && this[num].Crc != descriptorData.Crc) { testStatus.AddError(); resultHandler?.Invoke(testStatus, "Descriptor CRC mismatch"); } if (this[num].CompressedSize != descriptorData.CompressedSize) { testStatus.AddError(); resultHandler?.Invoke(testStatus, "Descriptor compressed size mismatch"); } if (this[num].Size != descriptorData.Size) { testStatus.AddError(); resultHandler?.Invoke(testStatus, "Descriptor size mismatch"); } } } if (resultHandler != null) { testStatus.SetOperation(TestOperation.EntryComplete); resultHandler(testStatus, null); } num++; } if (resultHandler != null) { testStatus.SetOperation(TestOperation.MiscellaneousTests); resultHandler(testStatus, null); } } catch (Exception ex2) { testStatus.AddError(); resultHandler?.Invoke(testStatus, "Exception during test - '" + ex2.Message + "'"); } if (resultHandler != null) { testStatus.SetOperation(TestOperation.Complete); testStatus.SetEntry(null); resultHandler(testStatus, null); } return testStatus.ErrorCount == 0; } private long TestLocalHeader(ZipEntry entry, HeaderTest tests) { lock (baseStream_) { bool num = (tests & HeaderTest.Header) != 0; bool num2 = (tests & HeaderTest.Extract) != 0; long num3 = offsetOfFirstEntry + entry.Offset; baseStream_.Seek(num3, SeekOrigin.Begin); int num4 = (int)ReadLEUint(); if (num4 != 67324752) { throw new ZipException($"Wrong local header signature at 0x{num3:x}, expected 0x{67324752:x8}, actual 0x{num4:x8}"); } short num5 = (short)(ReadLEUshort() & 0xFF); GeneralBitFlags generalBitFlags = (GeneralBitFlags)ReadLEUshort(); CompressionMethod compressionMethod = (CompressionMethod)ReadLEUshort(); short num6 = (short)ReadLEUshort(); short num7 = (short)ReadLEUshort(); uint num8 = ReadLEUint(); long num9 = ReadLEUint(); long num10 = ReadLEUint(); int num11 = ReadLEUshort(); int num12 = ReadLEUshort(); byte[] array = new byte[num11]; StreamUtils.ReadFully(baseStream_, array); byte[] array2 = new byte[num12]; StreamUtils.ReadFully(baseStream_, array2); ZipExtraData zipExtraData = new ZipExtraData(array2); if (zipExtraData.Find(1)) { num10 = zipExtraData.ReadLong(); num9 = zipExtraData.ReadLong(); if (generalBitFlags.HasAny(GeneralBitFlags.Descriptor)) { if (num10 != 0L && num10 != entry.Size) { throw new ZipException("Size invalid for descriptor"); } if (num9 != 0L && num9 != entry.CompressedSize) { throw new ZipException("Compressed size invalid for descriptor"); } } } else if (num5 >= 45 && ((int)num10 == -1 || (int)num9 == -1)) { throw new ZipException("Required Zip64 extended information missing"); } if (num2 && entry.IsFile) { if (!entry.IsCompressionMethodSupported()) { throw new ZipException("Compression method not supported"); } if (num5 > 51 || (num5 > 20 && num5 < 45)) { throw new ZipException($"Version required to extract this entry not supported ({num5})"); } if (generalBitFlags.HasAny(GeneralBitFlags.Patched | GeneralBitFlags.StrongEncryption | GeneralBitFlags.EnhancedCompress | GeneralBitFlags.HeaderMasked)) { throw new ZipException($"The library does not support the zip features required to extract this entry ({generalBitFlags & (GeneralBitFlags.Patched | GeneralBitFlags.StrongEncryption | GeneralBitFlags.EnhancedCompress | GeneralBitFlags.HeaderMasked):F})"); } } if (num) { if (num5 <= 63 && num5 != 10 && num5 != 11 && num5 != 20 && num5 != 21 && num5 != 25 && num5 != 27 && num5 != 45 && num5 != 46 && num5 != 50 && num5 != 51 && num5 != 52 && num5 != 61 && num5 != 62 && num5 != 63) { throw new ZipException($"Version required to extract this entry is invalid ({num5})"); } Encoding encoding = _stringCodec.ZipInputEncoding(generalBitFlags); if (generalBitFlags.HasAny(GeneralBitFlags.ReservedPKware4 | GeneralBitFlags.ReservedPkware14 | GeneralBitFlags.ReservedPkware15)) { throw new ZipException("Reserved bit flags cannot be set."); } if (generalBitFlags.HasAny(GeneralBitFlags.Encrypted) && num5 < 20) { throw new ZipException($"Version required to extract this entry is too low for encryption ({num5})"); } if (generalBitFlags.HasAny(GeneralBitFlags.StrongEncryption)) { if (!generalBitFlags.HasAny(GeneralBitFlags.Encrypted)) { throw new ZipException("Strong encryption flag set but encryption flag is not set"); } if (num5 < 50) { throw new ZipException($"Version required to extract this entry is too low for encryption ({num5})"); } } if (generalBitFlags.HasAny(GeneralBitFlags.Patched) && num5 < 27) { throw new ZipException($"Patched data requires higher version than ({num5})"); } if (generalBitFlags != (GeneralBitFlags)entry.Flags) { throw new ZipException($"Central header/local header flags mismatch ({(GeneralBitFlags)entry.Flags:F} vs {generalBitFlags:F})"); } if (entry.CompressionMethodForHeader != compressionMethod) { throw new ZipException($"Central header/local header compression method mismatch ({entry.CompressionMethodForHeader:G} vs {compressionMethod:G})"); } if (entry.Version != num5) { throw new ZipException("Extract version mismatch"); } if (generalBitFlags.HasAny(GeneralBitFlags.StrongEncryption) && num5 < 62) { throw new ZipException("Strong encryption flag set but version not high enough"); } if (generalBitFlags.HasAny(GeneralBitFlags.HeaderMasked) && (num6 != 0 || num7 != 0)) { throw new ZipException("Header masked set but date/time values non-zero"); } if (!generalBitFlags.HasAny(GeneralBitFlags.Descriptor) && num8 != (uint)entry.Crc) { throw new ZipException("Central header/local header crc mismatch"); } if (num10 == 0L && num9 == 0L && num8 != 0) { throw new ZipException("Invalid CRC for empty entry"); } if (entry.Name.Length > num11) { throw new ZipException("File name length mismatch"); } string text = encoding.GetString(array); if (text != entry.Name) { throw new ZipException("Central header and local header file name mismatch"); } if (entry.IsDirectory) { if (num10 > 0) { throw new ZipException("Directory cannot have size"); } if (entry.IsCrypted) { if (num9 > entry.EncryptionOverheadSize + 2) { throw new ZipException("Directory compressed size invalid"); } } else if (num9 > 2) { throw new ZipException("Directory compressed size invalid"); } } if (!ZipNameTransform.IsValidName(text, relaxed: true)) { throw new ZipException("Name is invalid"); } } if (!generalBitFlags.HasAny(GeneralBitFlags.Descriptor) || ((num10 > 0 || num9 > 0) && entry.Size > 0)) { if (num10 != 0L && num10 != entry.Size) { throw new ZipException($"Size mismatch between central header ({entry.Size}) and local header ({num10})"); } if (num9 != 0L && num9 != entry.CompressedSize && num9 != uint.MaxValue && num9 != -1) { throw new ZipException($"Compressed size mismatch between central header({entry.CompressedSize}) and local header({num9})"); } } int num13 = num11 + num12; return offsetOfFirstEntry + entry.Offset + 30 + num13; } } public void BeginUpdate(IArchiveStorage archiveStorage, IDynamicDataSource dataSource) { if (isDisposed_) { throw new ObjectDisposedException("ZipFile"); } if (IsEmbeddedArchive) { throw new ZipException("Cannot update embedded/SFX archives"); } archiveStorage_ = archiveStorage ?? throw new ArgumentNullException("archiveStorage"); updateDataSource_ = dataSource ?? throw new ArgumentNullException("dataSource"); updateIndex_ = new Dictionary<string, int>(); updates_ = new List<ZipUpdate>(entries_.Length); ZipEntry[] array = entries_; foreach (ZipEntry zipEntry in array) { int count = updates_.Count; updates_.Add(new ZipUpdate(zipEntry)); updateIndex_.Add(zipEntry.Name, count); } updates_.Sort(new UpdateComparer()); int num = 0; foreach (ZipUpdate item in updates_) { if (num == updates_.Count - 1) { break; } item.OffsetBasedSize = updates_[num + 1].Entry.Offset - item.Entry.Offset; num++; } updateCount_ = updates_.Count; contentsEdited_ = false; commentEdited_ = false; newComment_ = null; } public void BeginUpdate(IArchiveStorage archiveStorage) { BeginUpdate(archiveStorage, new DynamicDiskDataSource()); } public void BeginUpdate() { if (Name == null) { BeginUpdate(new MemoryArchiveStorage(), new DynamicDiskDataSource()); } else { BeginUpdate(new DiskArchiveStorage(this), new DynamicDiskDataSource()); } } public void CommitUpdate() { if (isDisposed_) { throw new ObjectDisposedException("ZipFile"); } CheckUpdating(); try { updateIndex_.Clear(); updateIndex_ = null; if (contentsEdited_) { RunUpdates(); } else if (commentEdited_) { UpdateCommentOnly(); } else if (entries_.Length == 0) { byte[] comment = ((newComment_ != null) ? newComment_.RawComment : _stringCodec.ZipArchiveCommentEncoding.GetBytes(comment_)); ZipFormat.WriteEndOfCentralDirectory(baseStream_, 0L, 0L, 0L, comment); } } finally { PostUpdateCleanup(); } } public void AbortUpdate() { PostUpdateCleanup(); } public void SetComment(string comment) { if (isDisposed_) { throw new ObjectDisposedException("ZipFile"); } CheckUpdating(); newComment_ = new ZipString(comment, _stringCodec.ZipArchiveCommentEncoding); if (newComment_.RawLength > 65535) { newComment_ = null; throw new ZipException("Comment length exceeds maximum - 65535"); } commentEdited_ = true; } private void AddUpdate(ZipUpdate update) { contentsEdited_ = true; int num = FindExistingUpdate(update.Entry.Name, isEntryName: true); if (num >= 0) { if (updates_[num] == null) { updateCount_++; } updates_[num] = update; } else { num = updates_.Count; updates_.Add(update); updateCount_++; updateIndex_.Add(update.Entry.Name, num); } } public void Add(string fileName, CompressionMethod compressionMethod, bool useUnicodeText) { if (fileName == null) { throw new ArgumentNullException("fileName"); } if (isDisposed_) { throw new ObjectDisposedException("ZipFile"); } CheckSupportedCompressionMethod(compressionMethod); CheckUpdating(); contentsEdited_ = true; ZipEntry zipEntry = EntryFactory.MakeFileEntry(fileName); zipEntry.IsUnicodeText = useUnicodeText; zipEntry.CompressionMethod = compressionMethod; AddUpdate(new ZipUpdate(fileName, zipEntry)); } public void Add(string fileName, CompressionMethod compressionMethod) { if (fileName == null) { throw new ArgumentNullException("fileName"); } CheckSupportedCompressionMethod(compressionMethod); CheckUpdating(); contentsEdited_ = true; ZipEntry zipEntry = EntryFactory.MakeFileEntry(fileName); zipEntry.CompressionMethod = compressionMethod; AddUpdate(new ZipUpdate(fileName, zipEntry)); } public void Add(string fileName) { if (fileName == null) { throw new ArgumentNullException("fileName"); } CheckUpdating(); AddUpdate(new ZipUpdate(fileName, EntryFactory.MakeFileEntry(fileName))); } public void Add(string fileName, string entryName) { if (fileName == null) { throw new ArgumentNullException("fileName"); } if (entryName == null) { throw new ArgumentNullException("entryName"); } CheckUpdating(); AddUpdate(new ZipUpdate(fileName, EntryFactory.MakeFileEntry(fileName, entryName, useFileSystem: true))); } public void Add(IStaticDataSource dataSource, string entryName) { if (dataSource == null) { throw new ArgumentNullException("dataSource"); } if (entryName == null) { throw new ArgumentNullException("entryName"); } CheckUpdating(); AddUpdate(new ZipUpdate(dataSource, EntryFactory.MakeFileEntry(entryName, useFileSystem: false))); } public void Add(IStaticDataSource dataSource, string entryName, CompressionMethod compressionMethod) { if (dataSource == null) { throw new ArgumentNullException("dataSource"); } if (entryName == null) { throw new ArgumentNullException("entryName"); } CheckSupportedCompressionMethod(compressionMethod); CheckUpdating(); ZipEntry zipEntry = EntryFactory.MakeFileEntry(entryName, useFileSystem: false); zipEntry.CompressionMethod = compressionMethod; AddUpdate(new ZipUpdate(dataSource, zipEntry)); } public void Add(IStaticDataSource dataSource, string entryName, CompressionMethod compressionMethod, bool useUnicodeText) { if (dataSource == null) { throw new ArgumentNullException("dataSource"); } if (entryName == null) { throw new ArgumentNullException("entryName"); } CheckSupportedCompressionMethod(compressionMethod); CheckUpdating(); ZipEntry zipEntry = EntryFactory.MakeFileEntry(entryName, useFileSystem: false); zipEntry.IsUnicodeText = useUnicodeText; zipEntry.CompressionMethod = compressionMethod; AddUpdate(new ZipUpdate(dataSource, zipEntry)); } public void Add(ZipEntry entry) { if (entry == null) { throw new ArgumentNullException("entry"); } CheckUpdating(); if (entry.Size != 0L || entry.CompressedSize != 0L) { throw new ZipException("Entry cannot have any data"); } AddUpdate(new ZipUpdate(UpdateCommand.Add, entry)); } public void Add(IStaticDataSource dataSource, ZipEntry entry) { if (entry == null) { throw new ArgumentNullException("entry"); } if (dataSource == null) { throw new ArgumentNullException("dataSource"); } if (entry.AESKeySize > 0) { throw new NotSupportedException("Creation of AES encrypted entries is not supported"); } CheckSupportedCompressionMethod(entry.CompressionMethod); CheckUpdating(); AddUpdate(new ZipUpdate(dataSource, entry)); } public void AddDirectory(string directoryName) { if (directoryName == null) { throw new ArgumentNullException("directoryName"); } CheckUpdating(); ZipEntry entry = EntryFactory.MakeDirectoryEntry(directoryName); AddUpdate(new ZipUpdate(UpdateCommand.Add, entry)); } private static void CheckSupportedCompressionMethod(CompressionMethod compressionMethod) { if (compressionMethod != CompressionMethod.Deflated && compressionMethod != CompressionMethod.Stored && compressionMethod != CompressionMethod.BZip2) { throw new NotImplementedException("Compression method not supported"); } } public bool Delete(string fileName) { if (fileName == null) { throw new ArgumentNullException("fileName"); } CheckUpdating(); bool flag = false; int num = FindExistingUpdate(fileName); if (num >= 0 && updates_[num] != null) { flag = true; contentsEdited_ = true; updates_[num] = null; updateCount_--; return flag; } throw new ZipException("Cannot find entry to delete"); } public void Delete(ZipEntry entry) { if (entry == null) { throw new ArgumentNullException("entry"); } CheckUpdating(); int num = FindExistingUpdate(entry); if (num >= 0) { contentsEdited_ = true; updates_[num] = null; updateCount_--; return; } throw new ZipException("Cannot find entry to delete"); } private void WriteLEShort(int value) { baseStream_.WriteByte((byte)(value & 0xFF)); baseStream_.WriteByte((byte)((value >> 8) & 0xFF)); } private void WriteLEUshort(ushort value) { baseStream_.WriteByte((byte)(value & 0xFF)); baseStream_.WriteByte((byte)(value >> 8)); } private void WriteLEInt(int value) { WriteLEShort(value & 0xFFFF); WriteLEShort(value >> 16); } private void WriteLEUint(uint value) { WriteLEUshort((ushort)(value & 0xFFFF)); WriteLEUshort((ushort)(value >> 16)); } private void WriteLeLong(long value) { WriteLEInt((int)(value & 0xFFFFFFFFu)); WriteLEInt((int)(value >> 32)); } private void WriteLEUlong(ulong value) { WriteLEUint((uint)(value & 0xFFFFFFFFu)); WriteLEUint((uint)(value >> 32)); } private void WriteLocalEntryHeader(ZipUpdate update) { ZipEntry outEntry = update.OutEntry; outEntry.Offset = baseStream_.Position; if (update.Command != UpdateCommand.Copy) { if (outEntry.CompressionMethod == CompressionMethod.Deflated) { if (outEntry.Size == 0L) { outEntry.CompressedSize = outEntry.Size; outEntry.Crc = 0L; outEntry.CompressionMethod = CompressionMethod.Stored; } } else if (outEntry.CompressionMethod == CompressionMethod.Stored) { outEntry.Flags &= -9; } if (HaveKeys) { outEntry.IsCr
BepInEx/plugins/Broheim-SileroTTS/System.Diagnostics.Tools.dll
Decompiled 2 days agousing System; using System.CodeDom.Compiler; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Diagnostics.Tools")] [assembly: AssemblyDescription("System.Diagnostics.Tools")] [assembly: AssemblyDefaultAlias("System.Diagnostics.Tools")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(GeneratedCodeAttribute))] [assembly: TypeForwardedTo(typeof(SuppressMessageAttribute))]
BepInEx/plugins/Broheim-SileroTTS/System.Diagnostics.Process.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using Microsoft.Win32.SafeHandles; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Diagnostics.Process")] [assembly: AssemblyDescription("System.Diagnostics.Process")] [assembly: AssemblyDefaultAlias("System.Diagnostics.Process")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(SafeProcessHandle))] [assembly: TypeForwardedTo(typeof(DataReceivedEventArgs))] [assembly: TypeForwardedTo(typeof(DataReceivedEventHandler))] [assembly: TypeForwardedTo(typeof(Process))] [assembly: TypeForwardedTo(typeof(ProcessModule))] [assembly: TypeForwardedTo(typeof(ProcessModuleCollection))] [assembly: TypeForwardedTo(typeof(ProcessPriorityClass))] [assembly: TypeForwardedTo(typeof(ProcessStartInfo))] [assembly: TypeForwardedTo(typeof(ProcessThread))] [assembly: TypeForwardedTo(typeof(ProcessThreadCollection))] [assembly: TypeForwardedTo(typeof(ThreadPriorityLevel))] [assembly: TypeForwardedTo(typeof(ThreadState))] [assembly: TypeForwardedTo(typeof(ThreadWaitReason))]
BepInEx/plugins/Broheim-SileroTTS/System.Threading.Overlapped.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Threading.Overlapped")] [assembly: AssemblyDescription("System.Threading.Overlapped")] [assembly: AssemblyDefaultAlias("System.Threading.Overlapped")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.3.0")] [assembly: TypeForwardedTo(typeof(IOCompletionCallback))] [assembly: TypeForwardedTo(typeof(NativeOverlapped))] [assembly: TypeForwardedTo(typeof(PreAllocatedOverlapped))] [assembly: TypeForwardedTo(typeof(ThreadPoolBoundHandle))]
BepInEx/plugins/Broheim-SileroTTS/System.Linq.Parallel.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Linq.Parallel")] [assembly: AssemblyDescription("System.Linq.Parallel")] [assembly: AssemblyDefaultAlias("System.Linq.Parallel")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(OrderedParallelQuery<>))] [assembly: TypeForwardedTo(typeof(ParallelEnumerable))] [assembly: TypeForwardedTo(typeof(ParallelExecutionMode))] [assembly: TypeForwardedTo(typeof(ParallelMergeOptions))] [assembly: TypeForwardedTo(typeof(ParallelQuery))] [assembly: TypeForwardedTo(typeof(ParallelQuery<>))]
BepInEx/plugins/Broheim-SileroTTS/System.ComponentModel.TypeConverter.dll
Decompiled 2 days agousing System; using System.ComponentModel; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.ComponentModel.TypeConverter")] [assembly: AssemblyDescription("System.ComponentModel.TypeConverter")] [assembly: AssemblyDefaultAlias("System.ComponentModel.TypeConverter")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(ArrayConverter))] [assembly: TypeForwardedTo(typeof(AttributeCollection))] [assembly: TypeForwardedTo(typeof(AttributeProviderAttribute))] [assembly: TypeForwardedTo(typeof(BaseNumberConverter))] [assembly: TypeForwardedTo(typeof(BooleanConverter))] [assembly: TypeForwardedTo(typeof(ByteConverter))] [assembly: TypeForwardedTo(typeof(CancelEventHandler))] [assembly: TypeForwardedTo(typeof(CharConverter))] [assembly: TypeForwardedTo(typeof(CollectionChangeAction))] [assembly: TypeForwardedTo(typeof(CollectionChangeEventArgs))] [assembly: TypeForwardedTo(typeof(CollectionChangeEventHandler))] [assembly: TypeForwardedTo(typeof(CollectionConverter))] [assembly: TypeForwardedTo(typeof(CustomTypeDescriptor))] [assembly: TypeForwardedTo(typeof(DateTimeConverter))] [assembly: TypeForwardedTo(typeof(DateTimeOffsetConverter))] [assembly: TypeForwardedTo(typeof(DecimalConverter))] [assembly: TypeForwardedTo(typeof(DefaultEventAttribute))] [assembly: TypeForwardedTo(typeof(DefaultPropertyAttribute))] [assembly: TypeForwardedTo(typeof(DoubleConverter))] [assembly: TypeForwardedTo(typeof(EnumConverter))] [assembly: TypeForwardedTo(typeof(EventDescriptor))] [assembly: TypeForwardedTo(typeof(EventDescriptorCollection))] [assembly: TypeForwardedTo(typeof(ExtenderProvidedPropertyAttribute))] [assembly: TypeForwardedTo(typeof(GuidConverter))] [assembly: TypeForwardedTo(typeof(HandledEventArgs))] [assembly: TypeForwardedTo(typeof(HandledEventHandler))] [assembly: TypeForwardedTo(typeof(ICustomTypeDescriptor))] [assembly: TypeForwardedTo(typeof(IExtenderProvider))] [assembly: TypeForwardedTo(typeof(IListSource))] [assembly: TypeForwardedTo(typeof(Int16Converter))] [assembly: TypeForwardedTo(typeof(Int32Converter))] [assembly: TypeForwardedTo(typeof(Int64Converter))] [assembly: TypeForwardedTo(typeof(InvalidAsynchronousStateException))] [assembly: TypeForwardedTo(typeof(ITypeDescriptorContext))] [assembly: TypeForwardedTo(typeof(ITypedList))] [assembly: TypeForwardedTo(typeof(MemberDescriptor))] [assembly: TypeForwardedTo(typeof(MultilineStringConverter))] [assembly: TypeForwardedTo(typeof(NullableConverter))] [assembly: TypeForwardedTo(typeof(PropertyDescriptor))] [assembly: TypeForwardedTo(typeof(PropertyDescriptorCollection))] [assembly: TypeForwardedTo(typeof(ProvidePropertyAttribute))] [assembly: TypeForwardedTo(typeof(RefreshEventArgs))] [assembly: TypeForwardedTo(typeof(RefreshEventHandler))] [assembly: TypeForwardedTo(typeof(SByteConverter))] [assembly: TypeForwardedTo(typeof(SingleConverter))] [assembly: TypeForwardedTo(typeof(StringConverter))] [assembly: TypeForwardedTo(typeof(TimeSpanConverter))] [assembly: TypeForwardedTo(typeof(TypeConverter))] [assembly: TypeForwardedTo(typeof(TypeConverterAttribute))] [assembly: TypeForwardedTo(typeof(TypeDescriptionProvider))] [assembly: TypeForwardedTo(typeof(TypeDescriptionProviderAttribute))] [assembly: TypeForwardedTo(typeof(TypeDescriptor))] [assembly: TypeForwardedTo(typeof(TypeListConverter))] [assembly: TypeForwardedTo(typeof(UInt16Converter))] [assembly: TypeForwardedTo(typeof(UInt32Converter))] [assembly: TypeForwardedTo(typeof(UInt64Converter))] [assembly: TypeForwardedTo(typeof(UriTypeConverter))]
BepInEx/plugins/Broheim-SileroTTS/System.Buffers.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Diagnostics.Tracing; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Security; using System.Security.Permissions; using System.Threading; using FxResources.System.Buffers; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: NeutralResourcesLanguage("en-US")] [assembly: AssemblyTitle("System.Buffers")] [assembly: AssemblyDescription("System.Buffers")] [assembly: AssemblyDefaultAlias("System.Buffers")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] [assembly: AssemblyFileVersion("4.6.28619.01")] [assembly: AssemblyInformationalVersion("4.6.28619.01 @BuiltBy: dlab14-DDVSOWINAGE069 @Branch: release/2.1 @SrcCode: https://github.com/dotnet/corefx/tree/7601f4f6225089ffb291dc7d58293c7bbf5c5d4f")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata(".NETFrameworkAssembly", "")] [assembly: AssemblyMetadata("Serviceable", "True")] [assembly: AssemblyMetadata("PreferInbox", "True")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("4.0.3.0")] [module: UnverifiableCode] namespace FxResources.System.Buffers { internal static class SR { } } namespace System { internal static class SR { private static ResourceManager s_resourceManager; private static ResourceManager ResourceManager => s_resourceManager ?? (s_resourceManager = new ResourceManager(ResourceType)); internal static Type ResourceType { get; } = typeof(SR); internal static string ArgumentException_BufferNotFromPool => GetResourceString("ArgumentException_BufferNotFromPool", null); [MethodImpl(MethodImplOptions.NoInlining)] private static bool UsingResourceKeys() { return false; } internal static string GetResourceString(string resourceKey, string defaultString) { string text = null; try { text = ResourceManager.GetString(resourceKey); } catch (MissingManifestResourceException) { } if (defaultString != null && resourceKey.Equals(text, StringComparison.Ordinal)) { return defaultString; } return text; } internal static string Format(string resourceFormat, params object[] args) { if (args != null) { if (UsingResourceKeys()) { return resourceFormat + string.Join(", ", args); } return string.Format(resourceFormat, args); } return resourceFormat; } internal static string Format(string resourceFormat, object p1) { if (UsingResourceKeys()) { return string.Join(", ", resourceFormat, p1); } return string.Format(resourceFormat, p1); } internal static string Format(string resourceFormat, object p1, object p2) { if (UsingResourceKeys()) { return string.Join(", ", resourceFormat, p1, p2); } return string.Format(resourceFormat, p1, p2); } internal static string Format(string resourceFormat, object p1, object p2, object p3) { if (UsingResourceKeys()) { return string.Join(", ", resourceFormat, p1, p2, p3); } return string.Format(resourceFormat, p1, p2, p3); } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.All)] internal class __BlockReflectionAttribute : Attribute { } } namespace System.Buffers { public abstract class ArrayPool<T> { private static ArrayPool<T> s_sharedInstance; public static ArrayPool<T> Shared { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { return Volatile.Read(ref s_sharedInstance) ?? EnsureSharedCreated(); } } [MethodImpl(MethodImplOptions.NoInlining)] private static ArrayPool<T> EnsureSharedCreated() { Interlocked.CompareExchange(ref s_sharedInstance, Create(), null); return s_sharedInstance; } public static ArrayPool<T> Create() { return new DefaultArrayPool<T>(); } public static ArrayPool<T> Create(int maxArrayLength, int maxArraysPerBucket) { return new DefaultArrayPool<T>(maxArrayLength, maxArraysPerBucket); } public abstract T[] Rent(int minimumLength); public abstract void Return(T[] array, bool clearArray = false); } [EventSource(Name = "System.Buffers.ArrayPoolEventSource")] internal sealed class ArrayPoolEventSource : EventSource { internal enum BufferAllocatedReason { Pooled, OverMaximumSize, PoolExhausted } internal static readonly System.Buffers.ArrayPoolEventSource Log = new System.Buffers.ArrayPoolEventSource(); [Event(1, Level = EventLevel.Verbose)] internal unsafe void BufferRented(int bufferId, int bufferSize, int poolId, int bucketId) { EventData* ptr = stackalloc EventData[4]; *ptr = new EventData { Size = 4, DataPointer = (IntPtr)(&bufferId) }; ptr[1] = new EventData { Size = 4, DataPointer = (IntPtr)(&bufferSize) }; ptr[2] = new EventData { Size = 4, DataPointer = (IntPtr)(&poolId) }; ptr[3] = new EventData { Size = 4, DataPointer = (IntPtr)(&bucketId) }; WriteEventCore(1, 4, ptr); } [Event(2, Level = EventLevel.Informational)] internal unsafe void BufferAllocated(int bufferId, int bufferSize, int poolId, int bucketId, BufferAllocatedReason reason) { EventData* ptr = stackalloc EventData[5]; *ptr = new EventData { Size = 4, DataPointer = (IntPtr)(&bufferId) }; ptr[1] = new EventData { Size = 4, DataPointer = (IntPtr)(&bufferSize) }; ptr[2] = new EventData { Size = 4, DataPointer = (IntPtr)(&poolId) }; ptr[3] = new EventData { Size = 4, DataPointer = (IntPtr)(&bucketId) }; ptr[4] = new EventData { Size = 4, DataPointer = (IntPtr)(&reason) }; WriteEventCore(2, 5, ptr); } [Event(3, Level = EventLevel.Verbose)] internal void BufferReturned(int bufferId, int bufferSize, int poolId) { WriteEvent(3, bufferId, bufferSize, poolId); } } internal sealed class DefaultArrayPool<T> : ArrayPool<T> { private sealed class Bucket { internal readonly int _bufferLength; private readonly T[][] _buffers; private readonly int _poolId; private SpinLock _lock; private int _index; internal int Id => GetHashCode(); internal Bucket(int bufferLength, int numberOfBuffers, int poolId) { _lock = new SpinLock(Debugger.IsAttached); _buffers = new T[numberOfBuffers][]; _bufferLength = bufferLength; _poolId = poolId; } internal T[] Rent() { T[][] buffers = _buffers; T[] array = null; bool lockTaken = false; bool flag = false; try { _lock.Enter(ref lockTaken); if (_index < buffers.Length) { array = buffers[_index]; buffers[_index++] = null; flag = array == null; } } finally { if (lockTaken) { _lock.Exit(useMemoryBarrier: false); } } if (flag) { array = new T[_bufferLength]; System.Buffers.ArrayPoolEventSource log = System.Buffers.ArrayPoolEventSource.Log; if (log.IsEnabled()) { log.BufferAllocated(array.GetHashCode(), _bufferLength, _poolId, Id, System.Buffers.ArrayPoolEventSource.BufferAllocatedReason.Pooled); } } return array; } internal void Return(T[] array) { if (array.Length != _bufferLength) { throw new ArgumentException(System.SR.ArgumentException_BufferNotFromPool, "array"); } bool lockTaken = false; try { _lock.Enter(ref lockTaken); if (_index != 0) { _buffers[--_index] = array; } } finally { if (lockTaken) { _lock.Exit(useMemoryBarrier: false); } } } } private const int DefaultMaxArrayLength = 1048576; private const int DefaultMaxNumberOfArraysPerBucket = 50; private static T[] s_emptyArray; private readonly Bucket[] _buckets; private int Id => GetHashCode(); internal DefaultArrayPool() : this(1048576, 50) { } internal DefaultArrayPool(int maxArrayLength, int maxArraysPerBucket) { if (maxArrayLength <= 0) { throw new ArgumentOutOfRangeException("maxArrayLength"); } if (maxArraysPerBucket <= 0) { throw new ArgumentOutOfRangeException("maxArraysPerBucket"); } if (maxArrayLength > 1073741824) { maxArrayLength = 1073741824; } else if (maxArrayLength < 16) { maxArrayLength = 16; } int id = Id; int num = System.Buffers.Utilities.SelectBucketIndex(maxArrayLength); Bucket[] array = new Bucket[num + 1]; for (int i = 0; i < array.Length; i++) { array[i] = new Bucket(System.Buffers.Utilities.GetMaxSizeForBucket(i), maxArraysPerBucket, id); } _buckets = array; } public override T[] Rent(int minimumLength) { if (minimumLength < 0) { throw new ArgumentOutOfRangeException("minimumLength"); } if (minimumLength == 0) { return s_emptyArray ?? (s_emptyArray = new T[0]); } System.Buffers.ArrayPoolEventSource log = System.Buffers.ArrayPoolEventSource.Log; T[] array = null; int num = System.Buffers.Utilities.SelectBucketIndex(minimumLength); if (num < _buckets.Length) { int num2 = num; do { array = _buckets[num2].Rent(); if (array != null) { if (log.IsEnabled()) { log.BufferRented(array.GetHashCode(), array.Length, Id, _buckets[num2].Id); } return array; } } while (++num2 < _buckets.Length && num2 != num + 2); array = new T[_buckets[num]._bufferLength]; } else { array = new T[minimumLength]; } if (log.IsEnabled()) { int hashCode = array.GetHashCode(); int bucketId = -1; log.BufferRented(hashCode, array.Length, Id, bucketId); log.BufferAllocated(hashCode, array.Length, Id, bucketId, (num >= _buckets.Length) ? System.Buffers.ArrayPoolEventSource.BufferAllocatedReason.OverMaximumSize : System.Buffers.ArrayPoolEventSource.BufferAllocatedReason.PoolExhausted); } return array; } public override void Return(T[] array, bool clearArray = false) { if (array == null) { throw new ArgumentNullException("array"); } if (array.Length == 0) { return; } int num = System.Buffers.Utilities.SelectBucketIndex(array.Length); if (num < _buckets.Length) { if (clearArray) { Array.Clear(array, 0, array.Length); } _buckets[num].Return(array); } System.Buffers.ArrayPoolEventSource log = System.Buffers.ArrayPoolEventSource.Log; if (log.IsEnabled()) { log.BufferReturned(array.GetHashCode(), array.Length, Id); } } } internal static class Utilities { [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static int SelectBucketIndex(int bufferSize) { uint num = (uint)(bufferSize - 1) >> 4; int num2 = 0; if (num > 65535) { num >>= 16; num2 = 16; } if (num > 255) { num >>= 8; num2 += 8; } if (num > 15) { num >>= 4; num2 += 4; } if (num > 3) { num >>= 2; num2 += 2; } if (num > 1) { num >>= 1; num2++; } return num2 + (int)num; } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static int GetMaxSizeForBucket(int binIndex) { return 16 << binIndex; } } }
BepInEx/plugins/Broheim-SileroTTS/System.IO.FileSystem.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using Microsoft.Win32.SafeHandles; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.IO.FileSystem")] [assembly: AssemblyDescription("System.IO.FileSystem")] [assembly: AssemblyDefaultAlias("System.IO.FileSystem")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.3.0")] [assembly: TypeForwardedTo(typeof(SafeFileHandle))] [assembly: TypeForwardedTo(typeof(Directory))] [assembly: TypeForwardedTo(typeof(DirectoryInfo))] [assembly: TypeForwardedTo(typeof(File))] [assembly: TypeForwardedTo(typeof(FileInfo))] [assembly: TypeForwardedTo(typeof(FileOptions))] [assembly: TypeForwardedTo(typeof(FileStream))] [assembly: TypeForwardedTo(typeof(FileSystemInfo))] [assembly: TypeForwardedTo(typeof(SearchOption))]
BepInEx/plugins/Broheim-SileroTTS/System.Drawing.Primitives.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Drawing; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Drawing.Primitives")] [assembly: AssemblyDescription("System.Drawing.Primitives")] [assembly: AssemblyDefaultAlias("System.Drawing.Primitives")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(Point))] [assembly: TypeForwardedTo(typeof(PointF))] [assembly: TypeForwardedTo(typeof(Rectangle))] [assembly: TypeForwardedTo(typeof(RectangleF))] [assembly: TypeForwardedTo(typeof(Size))] [assembly: TypeForwardedTo(typeof(SizeF))]
BepInEx/plugins/Broheim-SileroTTS/System.Xml.XDocument.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Xml.Linq; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Xml.XDocument")] [assembly: AssemblyDescription("System.Xml.XDocument")] [assembly: AssemblyDefaultAlias("System.Xml.XDocument")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(Extensions))] [assembly: TypeForwardedTo(typeof(LoadOptions))] [assembly: TypeForwardedTo(typeof(ReaderOptions))] [assembly: TypeForwardedTo(typeof(SaveOptions))] [assembly: TypeForwardedTo(typeof(XAttribute))] [assembly: TypeForwardedTo(typeof(XCData))] [assembly: TypeForwardedTo(typeof(XComment))] [assembly: TypeForwardedTo(typeof(XContainer))] [assembly: TypeForwardedTo(typeof(XDeclaration))] [assembly: TypeForwardedTo(typeof(XDocument))] [assembly: TypeForwardedTo(typeof(XDocumentType))] [assembly: TypeForwardedTo(typeof(XElement))] [assembly: TypeForwardedTo(typeof(XName))] [assembly: TypeForwardedTo(typeof(XNamespace))] [assembly: TypeForwardedTo(typeof(XNode))] [assembly: TypeForwardedTo(typeof(XNodeDocumentOrderComparer))] [assembly: TypeForwardedTo(typeof(XNodeEqualityComparer))] [assembly: TypeForwardedTo(typeof(XObject))] [assembly: TypeForwardedTo(typeof(XObjectChange))] [assembly: TypeForwardedTo(typeof(XObjectChangeEventArgs))] [assembly: TypeForwardedTo(typeof(XProcessingInstruction))] [assembly: TypeForwardedTo(typeof(XStreamingElement))] [assembly: TypeForwardedTo(typeof(XText))]
BepInEx/plugins/Broheim-SileroTTS/System.Security.Cryptography.Encoding.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Security.Cryptography; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Security.Cryptography.Encoding")] [assembly: AssemblyDescription("System.Security.Cryptography.Encoding")] [assembly: AssemblyDefaultAlias("System.Security.Cryptography.Encoding")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(AsnEncodedData))] [assembly: TypeForwardedTo(typeof(AsnEncodedDataCollection))] [assembly: TypeForwardedTo(typeof(AsnEncodedDataEnumerator))] [assembly: TypeForwardedTo(typeof(Oid))] [assembly: TypeForwardedTo(typeof(OidCollection))] [assembly: TypeForwardedTo(typeof(OidEnumerator))] [assembly: TypeForwardedTo(typeof(OidGroup))]
BepInEx/plugins/Broheim-SileroTTS/System.Globalization.Calendars.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Globalization.Calendars")] [assembly: AssemblyDescription("System.Globalization.Calendars")] [assembly: AssemblyDefaultAlias("System.Globalization.Calendars")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.3.0")] [assembly: TypeForwardedTo(typeof(ChineseLunisolarCalendar))] [assembly: TypeForwardedTo(typeof(EastAsianLunisolarCalendar))] [assembly: TypeForwardedTo(typeof(GregorianCalendar))] [assembly: TypeForwardedTo(typeof(GregorianCalendarTypes))] [assembly: TypeForwardedTo(typeof(HebrewCalendar))] [assembly: TypeForwardedTo(typeof(HijriCalendar))] [assembly: TypeForwardedTo(typeof(JapaneseCalendar))] [assembly: TypeForwardedTo(typeof(JapaneseLunisolarCalendar))] [assembly: TypeForwardedTo(typeof(JulianCalendar))] [assembly: TypeForwardedTo(typeof(KoreanCalendar))] [assembly: TypeForwardedTo(typeof(KoreanLunisolarCalendar))] [assembly: TypeForwardedTo(typeof(PersianCalendar))] [assembly: TypeForwardedTo(typeof(TaiwanCalendar))] [assembly: TypeForwardedTo(typeof(TaiwanLunisolarCalendar))] [assembly: TypeForwardedTo(typeof(ThaiBuddhistCalendar))] [assembly: TypeForwardedTo(typeof(UmAlQuraCalendar))]
BepInEx/plugins/Broheim-SileroTTS/System.Linq.Expressions.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Linq.Expressions")] [assembly: AssemblyDescription("System.Linq.Expressions")] [assembly: AssemblyDefaultAlias("System.Linq.Expressions")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(BinaryExpression))] [assembly: TypeForwardedTo(typeof(BlockExpression))] [assembly: TypeForwardedTo(typeof(CatchBlock))] [assembly: TypeForwardedTo(typeof(ConditionalExpression))] [assembly: TypeForwardedTo(typeof(ConstantExpression))] [assembly: TypeForwardedTo(typeof(DebugInfoExpression))] [assembly: TypeForwardedTo(typeof(DefaultExpression))] [assembly: TypeForwardedTo(typeof(ElementInit))] [assembly: TypeForwardedTo(typeof(Expression))] [assembly: TypeForwardedTo(typeof(Expression<>))] [assembly: TypeForwardedTo(typeof(ExpressionType))] [assembly: TypeForwardedTo(typeof(ExpressionVisitor))] [assembly: TypeForwardedTo(typeof(GotoExpression))] [assembly: TypeForwardedTo(typeof(GotoExpressionKind))] [assembly: TypeForwardedTo(typeof(IArgumentProvider))] [assembly: TypeForwardedTo(typeof(IDynamicExpression))] [assembly: TypeForwardedTo(typeof(IndexExpression))] [assembly: TypeForwardedTo(typeof(InvocationExpression))] [assembly: TypeForwardedTo(typeof(LabelExpression))] [assembly: TypeForwardedTo(typeof(LabelTarget))] [assembly: TypeForwardedTo(typeof(LambdaExpression))] [assembly: TypeForwardedTo(typeof(ListInitExpression))] [assembly: TypeForwardedTo(typeof(LoopExpression))] [assembly: TypeForwardedTo(typeof(MemberAssignment))] [assembly: TypeForwardedTo(typeof(MemberBinding))] [assembly: TypeForwardedTo(typeof(MemberBindingType))] [assembly: TypeForwardedTo(typeof(MemberExpression))] [assembly: TypeForwardedTo(typeof(MemberInitExpression))] [assembly: TypeForwardedTo(typeof(MemberListBinding))] [assembly: TypeForwardedTo(typeof(MemberMemberBinding))] [assembly: TypeForwardedTo(typeof(MethodCallExpression))] [assembly: TypeForwardedTo(typeof(NewArrayExpression))] [assembly: TypeForwardedTo(typeof(NewExpression))] [assembly: TypeForwardedTo(typeof(ParameterExpression))] [assembly: TypeForwardedTo(typeof(RuntimeVariablesExpression))] [assembly: TypeForwardedTo(typeof(SwitchCase))] [assembly: TypeForwardedTo(typeof(SwitchExpression))] [assembly: TypeForwardedTo(typeof(SymbolDocumentInfo))] [assembly: TypeForwardedTo(typeof(TryExpression))] [assembly: TypeForwardedTo(typeof(TypeBinaryExpression))] [assembly: TypeForwardedTo(typeof(UnaryExpression))] [assembly: TypeForwardedTo(typeof(IOrderedQueryable))] [assembly: TypeForwardedTo(typeof(IOrderedQueryable<>))] [assembly: TypeForwardedTo(typeof(IQueryable))] [assembly: TypeForwardedTo(typeof(IQueryable<>))] [assembly: TypeForwardedTo(typeof(IQueryProvider))]
BepInEx/plugins/Broheim-SileroTTS/BroheimSileroTts.dll
Decompiled 2 days agousing System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using Splatform; using TorchSharp; using TorchSharp.Utils; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyVersion("0.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BroheimSileroTts { internal static class AccentorV5 { private struct MlpLayer { public int Rows; public int Cols; public float[] W; public float[] B; } private static bool _loaded; private static string _vowels; private static string _sos; private static string _eos; private static string _allowed; private static Dictionary<string, int> _ngram; private static float[] _emb; private static int _embRows; private static Dictionary<int, int> _symToId; private static Dictionary<string, (int, int)> _exceptions; private static MlpLayer[] _stressClf; private static MlpLayer[] _yoClf; private static readonly Regex _splitRe = new Regex("([\\s.,!?;:<>=()/\\\\]+)", RegexOptions.Compiled); private static readonly Dictionary<char, string> _lat2cyr = new Dictionary<char, string> { { 'a', "а" }, { 'b', "б" }, { 'c', "к" }, { 'd', "д" }, { 'e', "е" }, { 'f', "ф" }, { 'g', "г" }, { 'h', "х" }, { 'i', "и" }, { 'j', "дж" }, { 'k', "к" }, { 'l', "л" }, { 'm', "м" }, { 'n', "н" }, { 'o', "о" }, { 'p', "п" }, { 'q', "к" }, { 'r', "р" }, { 's', "с" }, { 't', "т" }, { 'u', "у" }, { 'v', "в" }, { 'w', "в" }, { 'x', "кс" }, { 'y', "и" }, { 'z', "з" } }; public static void EnsureLoaded(string assetPath) { if (_loaded) { return; } using (BinaryReader binaryReader = new BinaryReader(File.OpenRead(assetPath))) { byte[] bytes = binaryReader.ReadBytes(8); if (Encoding.ASCII.GetString(bytes, 0, 7) != "BRACC02") { throw new InvalidDataException("Bad v5 accentor asset magic"); } _vowels = ReadShortString(binaryReader); _sos = ReadShortString(binaryReader); _eos = ReadShortString(binaryReader); binaryReader.ReadSingle(); binaryReader.ReadSingle(); _allowed = ReadShortString(binaryReader); int num = binaryReader.ReadInt32(); for (int i = 0; i < num; i++) { ReadShortString(binaryReader); } int num2 = binaryReader.ReadInt32(); _ngram = new Dictionary<string, int>(num2); for (int j = 0; j < num2; j++) { string key = ReadShortString(binaryReader); int value = binaryReader.ReadInt32(); _ngram[key] = value; } _embRows = num2; _emb = new float[num2 * 16]; for (int k = 0; k < _emb.Length; k++) { _emb[k] = binaryReader.ReadSingle(); } int num3 = binaryReader.ReadInt32(); _symToId = new Dictionary<int, int>(num3); for (int l = 0; l < num3; l++) { int key2 = binaryReader.ReadInt32(); int value2 = binaryReader.ReadInt32(); _symToId[key2] = value2; } int num4 = binaryReader.ReadInt32(); for (int m = 0; m < num4; m++) { binaryReader.ReadInt32(); binaryReader.ReadInt32(); } int num5 = binaryReader.ReadInt32(); _exceptions = new Dictionary<string, (int, int)>(num5); for (int n = 0; n < num5; n++) { string key3 = ReadShortString(binaryReader); int item = binaryReader.ReadInt32(); int item2 = binaryReader.ReadInt32(); _exceptions[key3] = ValueTuple.Create(item, item2); } _stressClf = ReadMlp(binaryReader); _yoClf = ReadMlp(binaryReader); } _loaded = true; } private static string ReadShortString(BinaryReader br) { int count = br.ReadUInt16(); return Encoding.UTF8.GetString(br.ReadBytes(count)); } private static MlpLayer[] ReadMlp(BinaryReader br) { int num = br.ReadInt32(); MlpLayer[] array = new MlpLayer[num]; for (int i = 0; i < num; i++) { int num2 = br.ReadInt32(); int num3 = br.ReadInt32(); float[] array2 = new float[num2 * num3]; for (int j = 0; j < array2.Length; j++) { array2[j] = br.ReadSingle(); } float[] array3 = new float[num2]; for (int k = 0; k < num2; k++) { array3[k] = br.ReadSingle(); } array[i] = new MlpLayer { Rows = num2, Cols = num3, W = array2, B = array3 }; } return array; } public static void BuildInputs(string text, int speakerId, out long[] sequence, out float[] dursRate, out float[] pitchCoefs) { string text2 = Accentor(PrepareTextInput(text)); sequence = PreprocessTacotron(text2); dursRate = Ones(sequence.Length); pitchCoefs = Ones(sequence.Length); } private static string ExpandNumbers(string text) { return Regex.Replace(text, "\\d+([.,]\\d+)?", delegate(Match m) { string value = m.Value; string text2 = null; int num = value.IndexOfAny(new char[2] { '.', ',' }); string s; if (num >= 0) { s = value.Substring(0, num); text2 = value.Substring(num + 1); } else { s = value; } StringBuilder stringBuilder = new StringBuilder(); if (!long.TryParse(s, out var result)) { return value; } stringBuilder.Append(NumberToRussian(result)); if (!string.IsNullOrEmpty(text2)) { stringBuilder.Append(" запятая "); string text3 = text2; foreach (char c in text3) { stringBuilder.Append(NumberToRussian(c - 48)).Append(' '); } } return stringBuilder.ToString().Trim(); }); } private static string NumberToRussian(long n) { if (n == 0L) { return "ноль"; } if (n < 0) { return "минус " + NumberToRussian(-n); } string[] u = new string[10] { "", "один", "два", "три", "четыре", "пять", "шесть", "семь", "восемь", "девять" }; string[] uF = new string[10] { "", "одна", "две", "три", "четыре", "пять", "шесть", "семь", "восемь", "девять" }; string[] teens = new string[10] { "десять", "одиннадцать", "двенадцать", "тринадцать", "четырнадцать", "пятнадцать", "шестнадцать", "семнадцать", "восемнадцать", "девятнадцать" }; string[] tens = new string[10] { "", "", "двадцать", "тридцать", "сорок", "пятьдесят", "шестьдесят", "семьдесят", "восемьдесят", "девяносто" }; string[] hundreds = new string[10] { "", "сто", "двести", "триста", "четыреста", "пятьсот", "шестьсот", "семьсот", "восемьсот", "девятьсот" }; string[][] array = new string[5][] { new string[3] { "", "", "" }, new string[3] { "тысяча", "тысячи", "тысяч" }, new string[3] { "миллион", "миллиона", "миллионов" }, new string[3] { "миллиард", "миллиарда", "миллиардов" }, new string[3] { "триллион", "триллиона", "триллионов" } }; int[] array2 = new int[5] { 0, 1, 0, 0, 0 }; List<string> list = new List<string>(); int num = 0; while (n > 0 && num < array.Length) { int num2 = (int)(n % 1000); n /= 1000; if (num2 > 0) { string text = ThreeDigitToRussian(num2, u, uF, teens, tens, hundreds, (num > 0) ? array2[num] : 0); if (num > 0) { int num3 = num2 % 100; if (num3 >= 11 && num3 <= 14) { num3 = 0; } int num4 = num2 % 10; int num5 = ((num4 != 1 || num3 == 11) ? ((num4 >= 2 && num4 <= 4 && (num3 < 11 || num3 > 14)) ? 1 : 2) : 0); text = text + " " + array[num][num5]; } list.Add(text); } num++; } list.Reverse(); return string.Join(" ", list); } private static string ThreeDigitToRussian(int chunk, string[] u, string[] uF, string[] teens, string[] tens, string[] hundreds, int gender) { StringBuilder stringBuilder = new StringBuilder(); int num = chunk / 100; if (num > 0) { stringBuilder.Append(hundreds[num]).Append(' '); } int num2 = chunk % 100; if (num2 >= 10 && num2 < 20) { stringBuilder.Append(teens[num2 - 10]); } else { int num3 = num2 / 10; if (num3 > 0) { stringBuilder.Append(tens[num3]).Append(' '); } int num4 = num2 % 10; if (num4 > 0) { stringBuilder.Append((gender == 1) ? uF[num4] : u[num4]); } } return stringBuilder.ToString().Trim(); } private static string TransliterateLatin(string text) { return Regex.Replace(text, "[a-z]+", delegate(Match m) { string text2 = m.Value.Replace("th", "з").Replace("ch", "ч").Replace("sh", "ш") .Replace("ph", "ф") .Replace("ck", "к") .Replace("oo", "у") .Replace("ee", "и") .Replace("ya", "я") .Replace("yo", "ё"); StringBuilder stringBuilder = new StringBuilder(text2.Length); string text3 = text2; foreach (char c in text3) { if (_lat2cyr.TryGetValue(c, out var value)) { stringBuilder.Append(value); } else { stringBuilder.Append(c); } } return stringBuilder.ToString(); }); } private static string PrepareTextInput(string text) { text = text.ToLowerInvariant(); text = text.Replace('—', '–').Replace('‑', '-'); text = ExpandNumbers(text); text = TransliterateLatin(text); HashSet<char> hashSet = new HashSet<char>(_allowed); hashSet.Add('^'); StringBuilder stringBuilder = new StringBuilder(); string text2 = text; foreach (char c in text2) { if (hashSet.Contains(c)) { stringBuilder.Append(c); } } return CleanStarText(Regex.Replace(stringBuilder.ToString(), "\\s+", " ").Trim()); } private static string CleanStarText(string text) { text = text.Replace("^", " ^"); text = Regex.Replace(text, "\\s+", " ").Trim(); text = text.Replace("^ ", "^"); text = Regex.Replace(text, "\\^+", "^").Trim(); if (text.Length != 0 && text[text.Length - 1] == '^') { text = text.Substring(0, text.Length - 1).Trim(); } return text; } private static void Tokenize(string sentence, List<string> tokens, List<string> modelInputs, List<bool> mask) { string[] array = _splitRe.Split(sentence); for (int i = 0; i < array.Length; i++) { string[] array2 = array[i].Split('-'); List<string> list; bool[] array3; if (array2.Length == 1) { list = new List<string> { array2[0] }; array3 = new bool[1] { true }; } else { list = new List<string>(); for (int j = 0; j < array2.Length - 1; j++) { list.Add(array2[j] + "-"); } list.Add(array2[^1]); array3 = new bool[array2.Length]; for (int k = 0; k < array2.Length - 1; k++) { array3[k] = true; } array3[array2.Length - 1] = array2[^1] != "то"; } string[] array4 = new string[list.Count]; for (int l = 0; l < list.Count; l++) { array4[l] = StripNonCyrillic(list[l].ToLowerInvariant()); } int num = Math.Min(array4.Length, array3.Length); for (int m = 0; m < num; m++) { array3[m] = array3[m] && array4[m].Length > 0; } for (int n = 0; n < list.Count; n++) { tokens.Add(list[n]); } for (int num2 = 0; num2 < array4.Length; num2++) { modelInputs.Add(array4[num2]); } for (int num3 = 0; num3 < num; num3++) { mask.Add(array3[num3]); } } } private static string StripNonCyrillic(string s) { StringBuilder stringBuilder = new StringBuilder(s.Length); foreach (char c in s) { if ((c >= 'А' && c <= 'я') || c == 'ё' || c == 'Ё') { stringBuilder.Append(c); } } return stringBuilder.ToString(); } private static List<string> WordNgrams(string word) { string text = "<" + word + ">"; int num = word.Length + 3; List<string> list = new List<string>(); for (int i = 1; i <= num; i++) { for (int j = 0; j <= text.Length - i; j++) { list.Add(text.Substring(j, i)); } } if (word.Length < 1) { list.Add(word); } return list; } private static float[,] Embedding(List<string> words) { float[,] array = new float[words.Count, 16]; int num = _ngram["UNK"]; for (int i = 0; i < words.Count; i++) { List<string> list = WordNgrams(words[i]); int num2 = 0; float[] array2 = new float[16]; for (int j = 0; j < list.Count; j++) { if (_ngram.TryGetValue(list[j], out var value)) { int num3 = value * 16; for (int k = 0; k < 16; k++) { array2[k] += _emb[num3 + k]; } num2++; } } if (num2 == 0) { int num4 = num * 16; for (int l = 0; l < 16; l++) { array2[l] += _emb[num4 + l]; } num2 = 1; } for (int m = 0; m < 16; m++) { array[i, m] = array2[m] / (float)num2; } } return array; } private static float[] Linear(MlpLayer L, float[] x) { float[] array = new float[L.Rows]; for (int i = 0; i < L.Rows; i++) { float num = L.B[i]; int num2 = i * L.Cols; for (int j = 0; j < L.Cols; j++) { num += L.W[num2 + j] * x[j]; } array[i] = num; } return array; } private static float[] Relu(float[] x) { float[] array = new float[x.Length]; for (int i = 0; i < x.Length; i++) { array[i] = ((x[i] < 0f) ? 0f : x[i]); } return array; } private static float[] RunMlp(MlpLayer[] layers, float[] x) { float[] array = x; for (int i = 0; i < layers.Length; i++) { array = Linear(layers[i], array); if (i != layers.Length - 1) { array = Relu(array); } } return array; } private static void GetModelPreds(List<string> words, out float[,] stressProb, out int[] stressPred, out float[,] yoProb, out int[] yoPred) { int count = words.Count; stressProb = new float[count, 10]; yoProb = new float[count, 7]; stressPred = new int[count]; yoPred = new int[count]; if (count == 0) { return; } float[,] array = Embedding(words); for (int i = 0; i < count; i++) { float[] array2 = new float[16]; for (int j = 0; j < 16; j++) { array2[j] = array[i, j]; } float[] logits = RunMlp(_stressClf, array2); float[] logits2 = RunMlp(_yoClf, array2); SoftmaxArgmax(logits, out stressPred[i], out var probAtArgmax); for (int k = 0; k < 10; k++) { stressProb[i, k] = probAtArgmax; } SoftmaxArgmax(logits2, out yoPred[i], out var probAtArgmax2); for (int l = 0; l < 7; l++) { yoProb[i, l] = probAtArgmax2; } } } private static void SoftmaxArgmax(float[] logits, out int argmax, out float probAtArgmax) { float num = float.NegativeInfinity; argmax = 0; for (int i = 0; i < logits.Length; i++) { if (logits[i] > num) { num = logits[i]; argmax = i; } } double num2 = 0.0; for (int j = 0; j < logits.Length; j++) { num2 += Math.Exp(logits[j] - num); } probAtArgmax = (float)(1.0 / num2); } private static void GetPositions(string word, int[] stressedVowelIds, int[] yoVowelIds, out List<int> stressPos, out List<int> yoPos, out int numVowels, out int firstVowel) { List<int> list = new List<int>(); List<int> list2 = new List<int>(); for (int i = 0; i < word.Length; i++) { char c = word[i]; if (_vowels.IndexOf(c) >= 0) { list.Add(i); } if (c == 'е') { list2.Add(i); } } stressPos = new List<int>(); foreach (int num in stressedVowelIds) { if (num < list.Count && list.Count > 0) { stressPos.Add(list[num]); } } yoPos = new List<int>(); foreach (int num2 in yoVowelIds) { if (num2 > 0 && num2 - 1 < list2.Count && list2.Count > 0) { yoPos.Add(list2[num2 - 1]); } } numVowels = list.Count; firstVowel = ((numVowels > 0) ? list[0] : (-1)); } private static string AccentuateException(string cleanWord, string rawWord, bool haveStress) { var (num, num2) = _exceptions[cleanWord]; if (haveStress) { List<int> list = new List<int>(); for (int i = 0; i < rawWord.Length; i++) { if (rawWord[i] == '+') { list.Add(i); } } string text = rawWord.Replace("+", ""); if (num2 != -1) { bool flag = false; for (int j = 0; j < list.Count; j++) { if (list[j] == num2 + 1) { flag = true; break; } } if (flag && num2 < text.Length) { char c = text[num2]; text = text.Substring(0, num2) + ((char.ToLowerInvariant(c) == c) ? 'ё' : 'Ё') + text.Substring(num2 + 1); } } { foreach (int item in list) { text = text.Substring(0, item) + "+" + text.Substring(item); } return text; } } if (num2 != -1 && num2 < rawWord.Length) { char c2 = rawWord[num2]; rawWord = rawWord.Substring(0, num2) + ((char.ToLowerInvariant(c2) == c2) ? 'ё' : 'Ё') + rawWord.Substring(num2 + 1); } return rawWord.Substring(0, num) + "+" + rawWord.Substring(num); } private static string Accentor(string sentence, bool putStress = true, bool putYo = true, bool stressSingleVowel = true) { if (!(putStress || putYo)) { return sentence; } List<string> list = new List<string>(); List<string> list2 = new List<string>(); List<bool> list3 = new List<bool>(); Tokenize(sentence, list, list2, list3); GetModelPreds(list2, out var stressProb, out var stressPred, out var yoProb, out var yoPred); List<string> list4 = new List<string>(); int num = Math.Min(Math.Min(list.Count, list2.Count), list3.Count); for (int i = 0; i < num; i++) { string text = list[i]; string text2 = list2[i]; bool num2 = list3[i]; string text3 = text.ToLowerInvariant(); if (!num2) { list4.Add(text); continue; } bool flag = text3.IndexOf('+') >= 0; bool flag2 = text3.IndexOf('ё') >= 0; if (flag && flag2) { list4.Add(text); continue; } if (!flag && flag2 && putStress) { int num3 = 0; string text4 = text3; foreach (char value in text4) { if (_vowels.IndexOf(value) >= 0) { num3++; } } if (num3 == 1 && !stressSingleVowel) { list4.Add(text); continue; } List<int> list5 = new List<int>(); for (int k = 0; k < text3.Length; k++) { if (text3[k] == 'ё') { list5.Add(k); } } string text5 = text; for (int l = 0; l < list5.Count; l++) { int num4 = list5[l] + l; text5 = text5.Substring(0, num4) + "+" + text5.Substring(num4); } list4.Add(text5); continue; } if (_exceptions.ContainsKey(text2)) { list4.Add(AccentuateException(text2, text, flag)); continue; } int[] array = new int[1] { stressPred[i] }; bool flag3 = stressProb[i, 0] > (putStress ? 0.5f : 1f) && !flag; int[] yoVowelIds = new int[1] { yoPred[i] }; bool flag4 = yoProb[i, 0] > (putYo ? 0.5f : 1f); int[] stressedVowelIds; if (flag) { string[] array2 = text3.Split('+'); List<int> list6 = new List<int>(); for (int m = 0; m < array2.Length; m++) { int num5 = 0; for (int n = 0; n < array2[m].Length; n++) { if (_vowels.IndexOf(array2[m][n]) >= 0) { num5++; } } list6.Add(num5); } stressedVowelIds = list6.ToArray(); } else { stressedVowelIds = array; } GetPositions(text3, stressedVowelIds, yoVowelIds, out var stressPos, out var yoPos, out var numVowels, out var firstVowel); if (numVowels == 0) { list4.Add(text); continue; } string text6 = text; for (int num6 = 0; num6 < yoPos.Count; num6++) { int num7 = yoPos[num6]; if (stressPos.Contains(num7) && flag4 && num7 < text3.Length && text3[num7] == 'е') { char c = text6[num7]; text6 = text6.Substring(0, num7) + ((char.ToLowerInvariant(c) == c) ? 'ё' : 'Ё') + text6.Substring(num7 + 1); } } if (numVowels == 1) { stressPos = new List<int> { firstVowel }; flag3 = stressSingleVowel && putStress; } if (!flag && flag3) { for (int num8 = 0; num8 < stressPos.Count; num8++) { int num9 = stressPos[num8] + num8; text6 = text6.Substring(0, num9) + "+" + text6.Substring(num9); } } list4.Add(text6); } return string.Join("", list4); } private static long[] PreprocessTacotron(string text) { string text2 = _sos + text + _eos; List<long> list = new List<long>(text2.Length); string text3 = text2; foreach (char c in text3) { if (_symToId.TryGetValue(c, out var value)) { list.Add(value); continue; } throw new InvalidDataException($"Symbol '{c}' (U+{(int)c:X4}) not in symbol_to_id"); } return list.ToArray(); } private static float[] Ones(int n) { float[] array = new float[n]; for (int i = 0; i < n; i++) { array[i] = 1f; } return array; } } [BepInPlugin("Broheim.SileroTTS", "Broheim Silero TTS", "1.3.0")] public class Plugin : BaseUnityPlugin { public enum Language { Russian, English, German } public enum OverlapMode { Queue, Interrupt, Overlap } public enum Channel { Chat, Center, Runes, Npc, Dreams } public const string Guid = "Broheim.SileroTTS"; public const string Name = "Broheim Silero TTS"; public const string Version = "1.3.0"; internal static ManualLogSource Log; internal static ConfigEntry<Language> VoiceLanguage; internal static ConfigEntry<string> VoiceSpeaker; internal static ConfigEntry<float> VoicePitch; internal static ConfigEntry<float> VoiceSpeed; internal static ConfigEntry<float> VoiceVolume; internal static ConfigEntry<OverlapMode> VoiceOverlap; internal static ConfigEntry<float> ChatVolume; internal static ConfigEntry<float> CenterVolume; internal static ConfigEntry<float> RunesVolume; internal static ConfigEntry<float> NpcVolume; internal static ConfigEntry<float> DreamsVolume; internal static ConfigEntry<int> PreRollMs; internal static ConfigEntry<bool> TrimTrailingSilence; internal static ConfigEntry<bool> NarrateChat; internal static ConfigEntry<bool> SkipOwnChat; internal static ConfigEntry<bool> AnnounceSpeaker; internal static ConfigEntry<bool> NarrateCenter; internal static ConfigEntry<bool> NarrateRunes; internal static ConfigEntry<bool> NarrateNpc; internal static ConfigEntry<bool> NarrateDreams; private static SileroEngine _engine; private Harmony _harmony; internal static SileroEngine Engine => _engine; internal static float VolumeScaled { get { if (VoiceVolume != null) { if (!(VoiceVolume.Value < 0f)) { if (!(VoiceVolume.Value > 3f)) { return VoiceVolume.Value; } return 3f; } return 0f; } return 1f; } } private void Awake() { //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; VoiceLanguage = ((BaseUnityPlugin)this).Config.Bind<Language>("Voice", "Language", Language.Russian, "Bundled Silero model. Russian = v5_4_ru (auto-stress + ё via n-gram accentor, 4 voices). English = v3_en (119 voices). German = v3_de (5 voices, umlaut handling)."); VoiceSpeaker = ((BaseUnityPlugin)this).Config.Bind<string>("Voice", "Speaker", "aidar", "Speaker name for the chosen language.\nRussian (v5_4_ru): aidar (male), baya, kseniya, xenia (eugene -> xenia fallback)\nEnglish: en_0 .. en_117 (curated: en_0, en_20, en_27, en_42, en_46, en_70, en_80, en_91, en_48, en_116, en_82, en_67, en_95)\nGerman: bernd_ungerer, eva_k, friedrich, hokuspokus, karlsson"); VoicePitch = ((BaseUnityPlugin)this).Config.Bind<float>("Voice", "Pitch", 1f, "Pitch multiplier. 1.0 = model default. Below 1.0 = lower / rougher / deeper voice (e.g. 0.8). Above 1.0 = higher / brighter. Range 0.5 – 2.0. Applied to the model's pitch contour, so it shifts the voice without retraining."); VoiceSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("Voice", "Speed", 1f, "Speech speed multiplier. 1.0 = model default. Below 1.0 = slower (e.g. 0.85). Above 1.0 = faster. Range 0.5 – 2.0. Controls token duration scaling."); VoiceVolume = ((BaseUnityPlugin)this).Config.Bind<float>("Voice", "Volume", 1f, "Output volume multiplier. 1.0 = model default. Above 1.0 amplifies the signal (e.g. 1.5 = noticeably louder, 2.0 = very loud; hard-clipped to avoid distortion). Below 1.0 = quieter. Range 0.0 – 3.0. Independent of the game's master volume."); VoiceOverlap = ((BaseUnityPlugin)this).Config.Bind<OverlapMode>("Voice", "OverlapMode", OverlapMode.Queue, "How overlapping narration lines are handled.\nQueue = wait for the current line to finish, then play the next (no overlap, recommended).\nInterrupt = cut off the current line and play the new one immediately.\nOverlap = let multiple lines play at once (mix)."); PreRollMs = ((BaseUnityPlugin)this).Config.Bind<int>("Voice", "PreRollMs", 120, "Leading silence (ms) added before each utterance. Fixes 'first letters swallowed' — the audio source/mixer drops the very first buffer on start, so a short lead-in lets the first phoneme land clean. 0 = off. Range 0 – 500. Default 120."); TrimTrailingSilence = ((BaseUnityPlugin)this).Config.Bind<bool>("Voice", "TrimTrailingSilence", true, "Cut trailing silence from the end of each utterance so narration feels snappy (the model often pads a long quiet tail)."); ChatVolume = ((BaseUnityPlugin)this).Config.Bind<float>("Channel Volume", "ChatVolume", 1f, "Volume multiplier for chat narration (on top of [Voice] Volume). Range 0.0 – 3.0."); CenterVolume = ((BaseUnityPlugin)this).Config.Bind<float>("Channel Volume", "CenterVolume", 1f, "Volume multiplier for center-screen messages (Huginn tips, events). Range 0.0 – 3.0."); RunesVolume = ((BaseUnityPlugin)this).Config.Bind<float>("Channel Volume", "RunesVolume", 1f, "Volume multiplier for rune/raven/intro text. Range 0.0 – 3.0."); NpcVolume = ((BaseUnityPlugin)this).Config.Bind<float>("Channel Volume", "NpcVolume", 1f, "Volume multiplier for NPC dialogue. Range 0.0 – 3.0."); DreamsVolume = ((BaseUnityPlugin)this).Config.Bind<float>("Channel Volume", "DreamsVolume", 1f, "Volume multiplier for dream/portal text. Range 0.0 – 3.0."); NarrateChat = ((BaseUnityPlugin)this).Config.Bind<bool>("Triggers", "NarrateChat", true, "Speak incoming chat messages."); SkipOwnChat = ((BaseUnityPlugin)this).Config.Bind<bool>("Triggers", "SkipOwnChat", true, "Do not speak your own outgoing chat messages."); AnnounceSpeaker = ((BaseUnityPlugin)this).Config.Bind<bool>("Triggers", "AnnounceSpeaker", false, "Prepend the speaker name and verb to chat narration (e.g. \"Haldor said in chat: ...\"). Off = voice only the message body."); NarrateCenter = ((BaseUnityPlugin)this).Config.Bind<bool>("Triggers", "NarrateCenter", true, "Speak center-screen messages (Huginn tips, boss defeats, events)."); NarrateRunes = ((BaseUnityPlugin)this).Config.Bind<bool>("Triggers", "NarrateRunes", false, "Speak rune, raven and intro/tutorial text."); NarrateNpc = ((BaseUnityPlugin)this).Config.Bind<bool>("Triggers", "NarrateNpc", false, "Speak NPC dialogue, positioned near the speaker."); NarrateDreams = ((BaseUnityPlugin)this).Config.Bind<bool>("Triggers", "NarrateDreams", false, "Speak the dream/portal text shown between sessions."); _engine = new SileroEngine((!string.IsNullOrEmpty(((BaseUnityPlugin)this).Info.Location)) ? Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location) : Environment.CurrentDirectory); _harmony = new Harmony("Broheim.SileroTTS"); _harmony.PatchAll(Assembly.GetExecutingAssembly()); Log.LogInfo((object)string.Format("{0} {1} loaded — voice {2}/{3}.", "Broheim Silero TTS", "1.3.0", VoiceLanguage.Value, VoiceSpeaker.Value)); } private void OnDestroy() { SpeechQueue.Reset(); Harmony harmony = _harmony; if (harmony != null) { harmony.UnpatchSelf(); } PlayerVoiceSource.Forget(); } internal static string LangCode() { return SileroEngine.LangCodeFromName(VoiceLanguage.Value.ToString()); } internal static void Narrate(string text, Channel ch) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(text)) { Log.LogDebug((object)$"Narrate: 2D ch={ch}, len={text.Length}, text='{Snip(text)}'"); SpeechQueue.Enqueue(new SpeechReq(text, ch, sp: false, default(Vector3))); } } internal static void NarrateAt(string text, Vector3 pos, Channel ch) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(text)) { Log.LogDebug((object)$"Narrate: spatial ch={ch}, len={text.Length}, pos={pos}, text='{Snip(text)}'"); SpeechQueue.Enqueue(new SpeechReq(text, ch, sp: true, pos)); } } internal static float ChannelVolume(Channel ch) { float num = ch switch { Channel.Chat => ChatVolume.Value, Channel.Center => CenterVolume.Value, Channel.Runes => RunesVolume.Value, Channel.Npc => NpcVolume.Value, Channel.Dreams => DreamsVolume.Value, _ => 1f, }; if (!(num < 0f)) { if (!(num > 3f)) { return num; } return 3f; } return 0f; } private static string Snip(string s) { if (s.Length <= 60) { return s; } return s.Substring(0, 60) + "…"; } internal static float ClampPitch(float v) { if (!(v < 0.5f)) { if (!(v > 2f)) { return v; } return 2f; } return 0.5f; } internal static float ClampSpeed(float v) { if (!(v < 0.5f)) { if (!(v > 2f)) { return v; } return 2f; } return 0.5f; } } internal sealed class Preprocessor { private readonly Dictionary<char, int> _symbolToId = new Dictionary<char, int>(); private readonly Dictionary<char, string> _asciiMap = new Dictionary<char, string>(); private readonly Dictionary<string, int> _speakerToId = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase); private readonly HashSet<char> _allowed = new HashSet<char>(); private int _sosId; private int _eosId; public string Language { get; private set; } public Preprocessor(string datPath) { Load(datPath); } private void Load(string path) { using BinaryReader binaryReader = new BinaryReader(File.OpenRead(path), Encoding.UTF8); byte[] bytes = binaryReader.ReadBytes(4); if (Encoding.ASCII.GetString(bytes, 0, 4) != "BSP1") { throw new InvalidDataException("Bad preprocess.dat magic"); } byte[] bytes2 = binaryReader.ReadBytes(2); Language = Encoding.ASCII.GetString(bytes2, 0, 2); string text = ReadStr(binaryReader); for (int i = 3; i < text.Length; i++) { _allowed.Add(text[i]); } int num = binaryReader.ReadInt32(); for (int j = 0; j < num; j++) { string text2 = ReadStr(binaryReader); int value = binaryReader.ReadInt32(); if (text2.Length == 1) { _symbolToId[text2[0]] = value; } } _sosId = binaryReader.ReadInt32(); _eosId = binaryReader.ReadInt32(); int num2 = binaryReader.ReadInt32(); for (int k = 0; k < num2; k++) { string text3 = ReadStr(binaryReader); string value2 = ReadStr(binaryReader); if (text3.Length == 1) { _asciiMap[text3[0]] = value2; } } int num3 = binaryReader.ReadInt32(); for (int l = 0; l < num3; l++) { string key = ReadStr(binaryReader); int value3 = binaryReader.ReadInt32(); _speakerToId[key] = value3; } } public int SpeakerToId(string speaker) { if (speaker != null && _speakerToId.TryGetValue(speaker, out var value)) { return value; } if (speaker != null) { int num = speaker.LastIndexOf('_'); if (num >= 0 && int.TryParse(speaker.Substring(num + 1), out var result) && _speakerToId.ContainsValue(result)) { return result; } } return 0; } public bool HasSpeaker(string speaker) { if (speaker != null) { return _speakerToId.ContainsKey(speaker); } return false; } public void BuildInputs(string text, out long[] sequence, out float[] dursRate, out float[] pitchCoefs) { sequence = null; dursRate = null; pitchCoefs = null; if (string.IsNullOrEmpty(text)) { return; } string text2 = text.ToLowerInvariant(); text2 = text2.Replace('—', '–').Replace('‑', '-'); StringBuilder stringBuilder = new StringBuilder(text2.Length); string text3 = text2; foreach (char c in text3) { if (_allowed.Contains(c)) { stringBuilder.Append(c); } } text2 = stringBuilder.ToString(); text2 = CollapseWhitespace(text2); if (string.IsNullOrEmpty(text2)) { return; } StringBuilder stringBuilder2 = new StringBuilder(text2.Length); text3 = text2; for (int i = 0; i < text3.Length; i++) { char key = text3[i]; stringBuilder2.Append(_asciiMap.TryGetValue(key, out var value) ? value : key.ToString()); } string text4 = stringBuilder2.ToString(); List<long> list = new List<long>(text4.Length + 2) { _sosId }; text3 = text4; foreach (char key2 in text3) { if (_symbolToId.TryGetValue(key2, out var value2)) { list.Add(value2); } } list.Add(_eosId); int count = list.Count; sequence = list.ToArray(); dursRate = new float[count]; pitchCoefs = new float[count]; for (int j = 0; j < count; j++) { dursRate[j] = 1f; pitchCoefs[j] = 1f; } } private static string CollapseWhitespace(string s) { StringBuilder stringBuilder = new StringBuilder(s.Length); bool flag = false; foreach (char c in s) { if (c == ' ' || c == '\t' || c == '\n' || c == '\r') { if (!flag) { stringBuilder.Append(' '); } flag = true; } else { stringBuilder.Append(c); flag = false; } } return stringBuilder.ToString().Trim(); } private static string ReadStr(BinaryReader br) { int count = br.ReadUInt16(); byte[] array = br.ReadBytes(count); return Encoding.UTF8.GetString(array, 0, array.Length); } } internal sealed class SileroEngine { private sealed class LangBundle { public string Lang; public ScriptModule Model; public Preprocessor Preproc; public bool UseAccentor; } public const string LangRu = "ru"; public const string LangEn = "en"; public const string LangDe = "de"; private readonly string _assetDir; private readonly object _lock = new object(); private bool _nativesOnPath; private readonly Dictionary<string, LangBundle> _bundles = new Dictionary<string, LangBundle>(StringComparer.Ordinal); public SileroEngine(string modDir) { _assetDir = Path.Combine(modDir, "silero_assets"); } private static int RuSpeakerIndex(string speaker) { return (speaker ?? "xenia").ToLowerInvariant() switch { "aidar" => 0, "baya" => 1, "kseniya" => 2, "xenia" => 3, "eugene" => 3, _ => 2, }; } public static string LangCodeFromName(string name) { switch ((name ?? "").ToLowerInvariant()) { case "russian": case "русский": case "ru": return "ru"; case "english": case "en": case "английский": return "en"; case "deutsch": case "de": case "german": case "немецкий": return "de"; default: return "ru"; } } private LangBundle LoadBundle(string lang) { string path = Path.Combine(_assetDir, lang); string text = Path.Combine(path, "tts_runner.pt"); if (!File.Exists(text)) { throw new FileNotFoundException("Silero tts_runner.pt missing for '" + lang + "' at " + text); } PrepareNativePath(); LangBundle langBundle = new LangBundle { Lang = lang, UseAccentor = (lang == "ru") }; if (lang == "ru") { string text2 = Path.Combine(path, "silero_accentor_v5.dat"); if (!File.Exists(text2)) { throw new FileNotFoundException("silero_accentor_v5.dat missing at " + text2); } AccentorV5.EnsureLoaded(text2); } else { string text3 = Path.Combine(path, "preprocess.dat"); if (!File.Exists(text3)) { throw new FileNotFoundException("preprocess.dat missing for '" + lang + "' at " + text3); } langBundle.Preproc = new Preprocessor(text3); } Plugin.Log.LogInfo((object)("Loading Silero model [" + lang + "]...")); langBundle.Model = jit.load(text, (DeviceType)0, -1L); ((Module)langBundle.Model).eval(); Plugin.Log.LogInfo((object)("Silero model [" + lang + "] ready.")); return langBundle; } private LangBundle Bundle(string lang) { lock (_lock) { if (_bundles.TryGetValue(lang, out var value)) { return value; } value = LoadBundle(lang); _bundles[lang] = value; return value; } } private void PrepareNativePath() { if (!_nativesOnPath) { string text = Environment.GetEnvironmentVariable("PATH") ?? ""; if (!text.Contains(_assetDir)) { Environment.SetEnvironmentVariable("PATH", _assetDir + Path.PathSeparator + text); } _nativesOnPath = true; } } public async Task<byte[]> SynthesizeAsync(string text, string lang, string speaker, float pitchScale, float speedScale) { if (string.IsNullOrEmpty(text)) { return null; } await Task.Yield(); lang = ((!string.IsNullOrEmpty(lang)) ? lang : "ru"); speaker = speaker ?? "aidar"; if (pitchScale <= 0f) { pitchScale = 1f; } if (speedScale <= 0f) { speedScale = 1f; } LangBundle langBundle; try { langBundle = Bundle(lang); } catch (Exception ex) { Plugin.Log.LogError((object)("Silero load [" + lang + "] failed: " + ex.Message)); return null; } try { int num; long[] sequence; float[] dursRate; float[] pitchCoefs; if (langBundle.UseAccentor) { num = RuSpeakerIndex(speaker); AccentorV5.BuildInputs(text, num, out sequence, out dursRate, out pitchCoefs); } else { num = langBundle.Preproc.SpeakerToId(speaker); langBundle.Preproc.BuildInputs(text, out sequence, out dursRate, out pitchCoefs); } if (sequence == null || sequence.Length == 0) { Plugin.Log.LogWarning((object)("Silero [" + lang + "]: empty token sequence, skipping.")); return null; } if (pitchScale != 1f) { for (int i = 0; i < pitchCoefs.Length; i++) { pitchCoefs[i] *= pitchScale; } } if (speedScale != 1f) { float num2 = 1f / speedScale; for (int j = 0; j < dursRate.Length; j++) { dursRate[j] *= num2; } } Plugin.Log.LogDebug((object)("Silero [" + lang + "]: seqLen=" + sequence.Length + " spk=" + num + " pitch=" + pitchScale.ToString("0.00") + " speed=" + speedScale.ToString("0.00"))); using (torch.no_grad()) { Tensor val = torch.tensor(sequence, (ScalarType?)null, (Device)null, false, (string[])null).unsqueeze(0L); Tensor val2 = torch.tensor(new long[1] { num }, (ScalarType?)null, (Device)null, false, (string[])null); Tensor val3 = torch.tensor(dursRate, (ScalarType?)null, (Device)null, false, (string[])null).unsqueeze(0L); Tensor val4 = torch.tensor(pitchCoefs, (ScalarType?)null, (Device)null, false, (string[])null).unsqueeze(0L); Tensor obj = langBundle.Model.invoke<Tensor>("forward", new object[4] { val, val2, val3, val4 }).reshape(new long[1] { -1L }).cpu(); int num3 = (int)obj.shape[0]; float[] array = new float[num3]; TensorAccessor<float> val5 = obj.data<float>(); try { for (int k = 0; k < num3; k++) { array[k] = val5[new long[1] { k }]; } } finally { ((IDisposable)val5)?.Dispose(); } Plugin.Log.LogDebug((object)("Silero [" + lang + "]: produced " + num3 + " samples.")); return PcmToWav(array, 24000); } } catch (Exception ex2) { Plugin.Log.LogError((object)("Silero synth [" + lang + "] failed: " + ex2)); return null; } } private static byte[] PcmToWav(float[] samples, int sampleRate) { short[] array = new short[samples.Length]; for (int i = 0; i < samples.Length; i++) { float num = samples[i]; if (num > 1f) { num = 1f; } else if (num < -1f) { num = -1f; } array[i] = (short)(num * 32767f); } int num2 = array.Length * 2; using MemoryStream memoryStream = new MemoryStream(44 + num2); using BinaryWriter binaryWriter = new BinaryWriter(memoryStream); binaryWriter.Write(Encoding.ASCII.GetBytes("RIFF")); binaryWriter.Write(36 + num2); binaryWriter.Write(Encoding.ASCII.GetBytes("WAVE")); binaryWriter.Write(Encoding.ASCII.GetBytes("fmt ")); binaryWriter.Write(16); binaryWriter.Write((short)1); binaryWriter.Write((short)1); binaryWriter.Write(sampleRate); binaryWriter.Write(sampleRate * 2); binaryWriter.Write((short)2); binaryWriter.Write((short)16); binaryWriter.Write(Encoding.ASCII.GetBytes("data")); binaryWriter.Write(num2); byte[] array2 = new byte[num2]; Buffer.BlockCopy(array, 0, array2, 0, num2); binaryWriter.Write(array2); return memoryStream.ToArray(); } } internal static class TextClean { private static readonly Regex Tags = new Regex("<[^>]+>", RegexOptions.Compiled); public static string Clean(string s) { if (!string.IsNullOrEmpty(s)) { return Tags.Replace(s, string.Empty).Trim(); } return s; } } [HarmonyPatch(typeof(Player), "SetLocalPlayer")] internal static class LocalPlayerAudioHook { private static void Postfix(Player __instance) { PlayerVoiceSource.EnsureOnLocalPlayer(__instance); Plugin.Log.LogDebug((object)"LocalPlayerAudioHook: ensured voice AudioSource on local player."); } } [HarmonyPatch(typeof(TextViewer), "ShowText")] internal static class LoreTextHook { private static void Postfix(TextViewer __instance, Style style, string topic, string textId) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected I4, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)Player.m_localPlayer == (Object)null) && Plugin.NarrateRunes.Value) { string text; string text2; switch ((int)style) { case 0: text = __instance.m_topic.text; text2 = __instance.m_text.text; break; case 1: text = __instance.m_introTopic.text; text2 = __instance.m_introText.text; break; case 2: text = __instance.m_ravenTopic.text; text2 = __instance.m_ravenText.text; break; default: text = Localization.instance.Localize(topic); text2 = Localization.instance.Localize(textId); break; } string text3 = TextClean.Clean(string.IsNullOrEmpty(text) ? text2 : (text + " " + text2)); Plugin.Log.LogDebug((object)$"LoreTextHook: style={style}, lineLen={text3?.Length ?? 0}, enabled={Plugin.NarrateRunes.Value}"); if (!string.IsNullOrEmpty(text3)) { Plugin.Narrate(text3, Plugin.Channel.Runes); } } } } [HarmonyPatch(typeof(MessageHud), "ShowMessage")] internal static class CenterMessageHook { private const float Cooldown = 1.5f; private static string _lastText; private static float _lastTime; private static void Postfix(MessageType type, string text) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Invalid comparison between Unknown and I4 if ((Object)(object)Player.m_localPlayer == (Object)null || (int)type != 2 || !Plugin.NarrateCenter.Value) { return; } string text2 = TextClean.Clean(Localization.instance.Localize(text)); if (!string.IsNullOrEmpty(text2)) { float time = Time.time; if (text2 == _lastText && time - _lastTime < 1.5f) { Plugin.Log.LogDebug((object)"CenterMessageHook: debounced duplicate."); return; } _lastText = text2; _lastTime = time; Plugin.Log.LogDebug((object)$"CenterMessageHook: lineLen={text2.Length}"); Plugin.Narrate(text2, Plugin.Channel.Center); } } } [HarmonyPatch(typeof(Chat), "SetNpcText")] internal static class NpcDialogueHook { private static void Postfix(GameObject talker, string topic, string text) { //IL_0098: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)Player.m_localPlayer == (Object)null) && Plugin.NarrateNpc.Value && !((Object)(object)talker == (Object)null)) { string text2 = TextClean.Clean(string.IsNullOrEmpty(topic) ? Localization.instance.Localize(text) : (Localization.instance.Localize(topic) + " " + Localization.instance.Localize(text))); Plugin.Log.LogDebug((object)$"NpcDialogueHook: talker={((Object)talker).name}, bodyLen={text2?.Length ?? 0}"); if (!string.IsNullOrEmpty(text2)) { Plugin.NarrateAt(text2, talker.transform.position, Plugin.Channel.Npc); } } } } [HarmonyPatch(typeof(Terminal), "AddString", new Type[] { typeof(PlatformUserID), typeof(string), typeof(Type), typeof(bool) })] internal static class ChatLineHook { private static void Postfix(PlatformUserID user, string text, Type type) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Expected I4, but got Unknown if (!Plugin.NarrateChat.Value || (Object)(object)Player.m_localPlayer == (Object)null) { return; } string text2 = null; PlayerInfo val = default(PlayerInfo); if (ZNet.TryGetPlayerByPlatformUserID(user, ref val)) { text2 = CensorShittyWords.FilterUGC(val.m_name, (UGCType)2, user, 0L); } bool flag = text2 != null && text2 == Player.m_localPlayer.GetPlayerName(); Plugin.Log.LogDebug((object)string.Format("ChatLineHook: type={0}, name={1}, isSelf={2}, textLen={3}", type, text2 ?? "?", flag, text?.Length ?? 0)); if (flag && Plugin.SkipOwnChat.Value) { Plugin.Log.LogDebug((object)"ChatLineHook: skipped own message."); return; } string s; if (Plugin.AnnounceSpeaker.Value && text2 != null) { string text3 = (int)type switch { 2 => "shouted", 0 => "whispered", 3 => "pinged", _ => "said", }; s = text2 + " " + text3 + " in chat: " + text; } else { s = text; } Plugin.Narrate(TextClean.Clean(s), Plugin.Channel.Chat); } } [HarmonyPatch(typeof(DreamTexts), "GetRandomDreamText")] internal static class DreamTextHook { private static void Postfix(ref DreamText __result) { if (__result != null && !((Object)(object)Player.m_localPlayer == (Object)null) && Plugin.NarrateDreams.Value) { string text = TextClean.Clean(Localization.instance.Localize(__result.m_text)); Plugin.Log.LogDebug((object)$"DreamTextHook: lineLen={text?.Length ?? 0}"); if (!string.IsNullOrEmpty(text)) { Plugin.Narrate(text, Plugin.Channel.Dreams); } } } } internal readonly struct SpeechReq { public readonly string Text; public readonly Plugin.Channel Ch; public readonly bool Spatial; public readonly Vector3 Pos; public SpeechReq(string t, Plugin.Channel c, bool sp, Vector3 p) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) Text = t; Ch = c; Spatial = sp; Pos = p; } } internal static class SpeechQueue { private static readonly ConcurrentQueue<SpeechReq> _q = new ConcurrentQueue<SpeechReq>(); private static readonly SemaphoreSlim _sem = new SemaphoreSlim(1, 1); private static CancellationTokenSource _playCts; private static AudioSource _cur2D; private static AudioSource _curTransient; private static int _drainRunning; public static void Enqueue(SpeechReq r) { if (string.IsNullOrEmpty(r.Text)) { return; } Plugin.OverlapMode value = Plugin.VoiceOverlap.Value; if (value == Plugin.OverlapMode.Overlap) { PlayOverlapAsync(r); return; } if (value == Plugin.OverlapMode.Interrupt) { SpeechReq result; while (_q.TryDequeue(out result)) { } StopCurrent(); _playCts?.Cancel(); } _q.Enqueue(r); StartDrain(); } public static void Reset() { SpeechReq result; while (_q.TryDequeue(out result)) { } StopCurrent(); _playCts?.Cancel(); } private static void StartDrain() { if (Interlocked.CompareExchange(ref _drainRunning, 1, 0) == 0) { DrainAsync(); } } private static async Task DrainAsync() { await _sem.WaitAsync(); try { SpeechReq r; while (_q.TryDequeue(out r)) { _playCts?.Dispose(); _playCts = new CancellationTokenSource(); CancellationToken ct = _playCts.Token; byte[] array; try { array = await Plugin.Engine.SynthesizeAsync(r.Text, Plugin.LangCode(), Plugin.VoiceSpeaker.Value, Plugin.ClampPitch(Plugin.VoicePitch.Value), Plugin.ClampSpeed(Plugin.VoiceSpeed.Value)); } catch (Exception ex) { Plugin.Log.LogError((object)("queue synth threw: " + ex)); continue; } if (array == null || array.Length <= 44 || ct.IsCancellationRequested) { continue; } float num = Plugin.VolumeScaled * Plugin.ChannelVolume(r.Ch); int num2 = Mathf.Clamp(Plugin.PreRollMs.Value, 0, 500); bool value = Plugin.TrimTrailingSilence.Value; AudioClip val = WavPlayer.ToClip(array, num, num2, value); if (!((Object)(object)val == (Object)null)) { float length = val.length; if (r.Spatial) { _curTransient = WavPlayer.PlaySpatialClip(val, r.Pos); } else { _cur2D = WavPlayer.Play2DClip(val); } Plugin.Log.LogDebug((object)$"queue: ch={r.Ch} dur={length:F1}s vol={num:F2} pre={num2}ms trim={value}"); try { await Task.Delay((int)(length * 1000f) + 70, ct); } catch (TaskCanceledException) { } } } } finally { _drainRunning = 0; _sem.Release(); if (!_q.IsEmpty) { StartDrain(); } } } private static async Task PlayOverlapAsync(SpeechReq r) { byte[] array; try { array = await Plugin.Engine.SynthesizeAsync(r.Text, Plugin.LangCode(), Plugin.VoiceSpeaker.Value, Plugin.ClampPitch(Plugin.VoicePitch.Value), Plugin.ClampSpeed(Plugin.VoiceSpeed.Value)); } catch (Exception ex) { Plugin.Log.LogError((object)("overlap synth threw: " + ex)); return; } if (array == null || array.Length <= 44) { return; } float num = Plugin.VolumeScaled * Plugin.ChannelVolume(r.Ch); int preRollMs = Mathf.Clamp(Plugin.PreRollMs.Value, 0, 500); bool value = Plugin.TrimTrailingSilence.Value; AudioClip val = WavPlayer.ToClip(array, num, preRollMs, value); if (!((Object)(object)val == (Object)null)) { if (r.Spatial) { WavPlayer.PlaySpatialClip(val, r.Pos); } else { WavPlayer.Play2DTransient(val); } Plugin.Log.LogDebug((object)$"overlap: ch={r.Ch} dur={val.length:F1}s vol={num:F2}"); } } private static void StopCurrent() { try { if ((Object)(object)_cur2D != (Object)null) { _cur2D.Stop(); _cur2D = null; } } catch { } try { if ((Object)(object)_curTransient != (Object)null) { GameObject gameObject = ((Component)_curTransient).gameObject; _curTransient = null; Object.Destroy((Object)(object)gameObject); } } catch { } } } internal static class WavPlayer { private const float DefaultSpatial = 0f; private const float SilenceThreshold = 0.012f; private const int KeepTailMs = 40; public static AudioClip ToClip(byte[] wav, float vol, int preRollMs, bool trimTrailing, string name = "sileroVoice") { if (wav == null || wav.Length < 44) { return null; } int num = ReadInt16(wav, 22); int num2 = ReadInt32(wav, 24); int num3 = ReadInt16(wav, 34); if (num <= 0 || num2 <= 0) { return null; } if (num3 != 16 && num3 != 8) { Plugin.Log.LogWarning((object)"WavPlayer: only 8/16-bit PCM supported."); return null; } int i = 12; int num4 = -1; int num5 = 0; int num6; for (; i + 8 <= wav.Length; i += 8 + num6) { string text = Encoding.ASCII.GetString(wav, i, 4); num6 = ReadInt32(wav, i + 4); if (text == "data") { num4 = i + 8; num5 = num6; break; } } if (num4 < 0) { return null; } if (num4 + num5 > wav.Length) { num5 = wav.Length - num4; } int num7 = num3 / 8; int num8 = num5 / num7; bool flag = vol != 1f; float[] array = new float[num8]; if (num3 == 16) { for (int j = 0; j < num8; j++) { float num9 = (float)ReadInt16(wav, num4 + j * 2) / 32768f; if (flag) { num9 *= vol; if (num9 > 1f) { num9 = 1f; } else if (num9 < -1f) { num9 = -1f; } } array[j] = num9; } } else { for (int k = 0; k < num8; k++) { float num10 = (float)(wav[num4 + k] - 128) / 128f; if (flag) { num10 *= vol; if (num10 > 1f) { num10 = 1f; } else if (num10 < -1f) { num10 = -1f; } } array[k] = num10; } } int num11 = array.Length; if (trimTrailing && num11 > 0) { int num12 = 40 * num2 / 1000 * num; int num13 = num11; while (num13 > num12 && Mathf.Abs(array[num13 - 1]) < 0.012f) { num13--; } if (num13 < num11) { num11 = num13; } } int num14 = ((preRollMs > 0) ? (preRollMs * num2 / 1000 * num) : 0); if (num14 > 0 || num11 != array.Length) { float[] array2 = new float[num14 + num11]; Array.Copy(array, 0, array2, num14, num11); array = array2; num11 = array2.Length; } AudioClip val = AudioClip.Create(name, num11 / num, num, num2, false); val.SetData(array, 0); Plugin.Log.LogDebug((object)$"WavPlayer.ToClip: samples={num11}, ch={num}, sr={num2}, bits={num3}, vol={vol:F2}, pre={preRollMs}ms, trim={trimTrailing}"); return val; } public static AudioSource Play2DClip(AudioClip clip) { if ((Object)(object)clip == (Object)null) { return null; } AudioSource val = PlayerVoiceSource.Find(); if ((Object)(object)val == (Object)null) { Plugin.Log.LogDebug((object)"Play2DClip: player source missing, using transient 2D source."); return SpawnTransient(clip, 0f, null, autoDestroy: false); } val.Stop(); val.clip = clip; val.time = 0f; val.Play(); Plugin.Log.LogDebug((object)$"Play2DClip: clipLen={clip.length}s"); return val; } public static AudioSource Play2DTransient(AudioClip clip) { if ((Object)(object)clip == (Object)null) { return null; } return SpawnTransient(clip, 0f, null, autoDestroy: true); } public static AudioSource PlaySpatialClip(AudioClip clip, Vector3 worldPos) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)clip == (Object)null) { return null; } Plugin.Log.LogDebug((object)$"PlaySpatialClip: clipLen={clip.length}s, pos={worldPos}"); return SpawnTransient(clip, 1f, worldPos, autoDestroy: true); } private static AudioSource SpawnTransient(AudioClip clip, float spatial, Vector3? pos, bool autoDestroy) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_001c: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("SileroTtsVoice"); if (pos.HasValue) { val.transform.position = pos.Value; } AudioSource obj = val.AddComponent<AudioSource>(); obj.clip = clip; obj.spatialBlend = spatial; obj.bypassEffects = true; obj.bypassReverbZones = true; obj.bypassListenerEffects = true; obj.ignoreListenerVolume = true; obj.ignoreListenerPause = true; obj.volume = 1f; obj.Play(); if (autoDestroy) { Object.Destroy((Object)(object)val, clip.length + 0.2f); } return obj; } private static int ReadInt32(byte[] b, int o) { return b[o] | (b[o + 1] << 8) | (b[o + 2] << 16) | (b[o + 3] << 24); } private static short ReadInt16(byte[] b, int o) { return (short)(b[o] | (b[o + 1] << 8)); } } internal static class PlayerVoiceSource { private const string ChildName = "SileroVoice"; private static AudioSource _cached; public static AudioSource Find() { if ((Object)(object)_cached != (Object)null) { return _cached; } Player localPlayer = Player.m_localPlayer; if ((Object)(object)localPlayer == (Object)null) { return null; } Transform val = ((Component)localPlayer).transform.Find("SileroVoice"); _cached = (((Object)(object)val != (Object)null) ? ((Component)val).GetComponent<AudioSource>() : null); return _cached; } public static void EnsureOnLocalPlayer(Player p) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown if (!((Object)(object)p == (Object)null)) { Transform transform = ((Component)p).transform; if ((Object)(object)transform.Find("SileroVoice") != (Object)null) { _cached = null; Find(); return; } GameObject val = new GameObject("SileroVoice"); AudioSource obj = val.AddComponent<AudioSource>(); obj.spatialBlend = 0f; obj.dopplerLevel = 0f; obj.rolloffMode = (AudioRolloffMode)1; obj.minDistance = 1f; obj.maxDistance = 100f; obj.ignoreListenerVolume = true; obj.ignoreListenerPause = true; obj.bypassEffects = true; obj.bypassReverbZones = true; val.transform.SetParent(transform, false); _cached = obj; } } public static void Forget() { _cached = null; } } }
BepInEx/plugins/Broheim-SileroTTS/System.Runtime.InteropServices.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Runtime.InteropServices")] [assembly: AssemblyDescription("System.Runtime.InteropServices")] [assembly: AssemblyDefaultAlias("System.Runtime.InteropServices")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(DataMisalignedException))] [assembly: TypeForwardedTo(typeof(DllNotFoundException))] [assembly: TypeForwardedTo(typeof(Missing))] [assembly: TypeForwardedTo(typeof(ArrayWithOffset))] [assembly: TypeForwardedTo(typeof(BestFitMappingAttribute))] [assembly: TypeForwardedTo(typeof(BStrWrapper))] [assembly: TypeForwardedTo(typeof(CallingConvention))] [assembly: TypeForwardedTo(typeof(ClassInterfaceAttribute))] [assembly: TypeForwardedTo(typeof(ClassInterfaceType))] [assembly: TypeForwardedTo(typeof(CoClassAttribute))] [assembly: TypeForwardedTo(typeof(ComAwareEventInfo))] [assembly: TypeForwardedTo(typeof(ComDefaultInterfaceAttribute))] [assembly: TypeForwardedTo(typeof(ComEventInterfaceAttribute))] [assembly: TypeForwardedTo(typeof(ComEventsHelper))] [assembly: TypeForwardedTo(typeof(COMException))] [assembly: TypeForwardedTo(typeof(ComImportAttribute))] [assembly: TypeForwardedTo(typeof(ComInterfaceType))] [assembly: TypeForwardedTo(typeof(ComMemberType))] [assembly: TypeForwardedTo(typeof(ComSourceInterfacesAttribute))] [assembly: TypeForwardedTo(typeof(ADVF))] [assembly: TypeForwardedTo(typeof(BIND_OPTS))] [assembly: TypeForwardedTo(typeof(BINDPTR))] [assembly: TypeForwardedTo(typeof(CALLCONV))] [assembly: TypeForwardedTo(typeof(CONNECTDATA))] [assembly: TypeForwardedTo(typeof(DATADIR))] [assembly: TypeForwardedTo(typeof(DESCKIND))] [assembly: TypeForwardedTo(typeof(DISPPARAMS))] [assembly: TypeForwardedTo(typeof(DVASPECT))] [assembly: TypeForwardedTo(typeof(ELEMDESC))] [assembly: TypeForwardedTo(typeof(EXCEPINFO))] [assembly: TypeForwardedTo(typeof(FILETIME))] [assembly: TypeForwardedTo(typeof(FORMATETC))] [assembly: TypeForwardedTo(typeof(FUNCDESC))] [assembly: TypeForwardedTo(typeof(FUNCFLAGS))] [assembly: TypeForwardedTo(typeof(FUNCKIND))] [assembly: TypeForwardedTo(typeof(IAdviseSink))] [assembly: TypeForwardedTo(typeof(IBindCtx))] [assembly: TypeForwardedTo(typeof(IConnectionPoint))] [assembly: TypeForwardedTo(typeof(IConnectionPointContainer))] [assembly: TypeForwardedTo(typeof(IDLDESC))] [assembly: TypeForwardedTo(typeof(IDLFLAG))] [assembly: TypeForwardedTo(typeof(IEnumConnectionPoints))] [assembly: TypeForwardedTo(typeof(IEnumConnections))] [assembly: TypeForwardedTo(typeof(IEnumFORMATETC))] [assembly: TypeForwardedTo(typeof(IEnumMoniker))] [assembly: TypeForwardedTo(typeof(IEnumString))] [assembly: TypeForwardedTo(typeof(IEnumVARIANT))] [assembly: TypeForwardedTo(typeof(IMoniker))] [assembly: TypeForwardedTo(typeof(IMPLTYPEFLAGS))] [assembly: TypeForwardedTo(typeof(INVOKEKIND))] [assembly: TypeForwardedTo(typeof(IPersistFile))] [assembly: TypeForwardedTo(typeof(IRunningObjectTable))] [assembly: TypeForwardedTo(typeof(IStream))] [assembly: TypeForwardedTo(typeof(ITypeComp))] [assembly: TypeForwardedTo(typeof(ITypeInfo))] [assembly: TypeForwardedTo(typeof(ITypeInfo2))] [assembly: TypeForwardedTo(typeof(ITypeLib))] [assembly: TypeForwardedTo(typeof(ITypeLib2))] [assembly: TypeForwardedTo(typeof(LIBFLAGS))] [assembly: TypeForwardedTo(typeof(PARAMDESC))] [assembly: TypeForwardedTo(typeof(PARAMFLAG))] [assembly: TypeForwardedTo(typeof(STATDATA))] [assembly: TypeForwardedTo(typeof(STATSTG))] [assembly: TypeForwardedTo(typeof(STGMEDIUM))] [assembly: TypeForwardedTo(typeof(SYSKIND))] [assembly: TypeForwardedTo(typeof(TYMED))] [assembly: TypeForwardedTo(typeof(TYPEATTR))] [assembly: TypeForwardedTo(typeof(TYPEDESC))] [assembly: TypeForwardedTo(typeof(TYPEFLAGS))] [assembly: TypeForwardedTo(typeof(TYPEKIND))] [assembly: TypeForwardedTo(typeof(TYPELIBATTR))] [assembly: TypeForwardedTo(typeof(VARDESC))] [assembly: TypeForwardedTo(typeof(VARFLAGS))] [assembly: TypeForwardedTo(typeof(VARKIND))] [assembly: TypeForwardedTo(typeof(CriticalHandle))] [assembly: TypeForwardedTo(typeof(CurrencyWrapper))] [assembly: TypeForwardedTo(typeof(CustomQueryInterfaceMode))] [assembly: TypeForwardedTo(typeof(CustomQueryInterfaceResult))] [assembly: TypeForwardedTo(typeof(DefaultCharSetAttribute))] [assembly: TypeForwardedTo(typeof(DefaultDllImportSearchPathsAttribute))] [assembly: TypeForwardedTo(typeof(DefaultParameterValueAttribute))] [assembly: TypeForwardedTo(typeof(DispatchWrapper))] [assembly: TypeForwardedTo(typeof(DispIdAttribute))] [assembly: TypeForwardedTo(typeof(DllImportAttribute))] [assembly: TypeForwardedTo(typeof(DllImportSearchPath))] [assembly: TypeForwardedTo(typeof(ErrorWrapper))] [assembly: TypeForwardedTo(typeof(GCHandle))] [assembly: TypeForwardedTo(typeof(GCHandleType))] [assembly: TypeForwardedTo(typeof(GuidAttribute))] [assembly: TypeForwardedTo(typeof(HandleCollector))] [assembly: TypeForwardedTo(typeof(ICustomAdapter))] [assembly: TypeForwardedTo(typeof(ICustomQueryInterface))] [assembly: TypeForwardedTo(typeof(InAttribute))] [assembly: TypeForwardedTo(typeof(InterfaceTypeAttribute))] [assembly: TypeForwardedTo(typeof(InvalidComObjectException))] [assembly: TypeForwardedTo(typeof(InvalidOleVariantTypeException))] [assembly: TypeForwardedTo(typeof(Marshal))] [assembly: TypeForwardedTo(typeof(MarshalAsAttribute))] [assembly: TypeForwardedTo(typeof(MarshalDirectiveException))] [assembly: TypeForwardedTo(typeof(OptionalAttribute))] [assembly: TypeForwardedTo(typeof(PreserveSigAttribute))] [assembly: TypeForwardedTo(typeof(SafeArrayRankMismatchException))] [assembly: TypeForwardedTo(typeof(SafeArrayTypeMismatchException))] [assembly: TypeForwardedTo(typeof(SafeBuffer))] [assembly: TypeForwardedTo(typeof(SafeHandle))] [assembly: TypeForwardedTo(typeof(SEHException))] [assembly: TypeForwardedTo(typeof(TypeIdentifierAttribute))] [assembly: TypeForwardedTo(typeof(UnknownWrapper))] [assembly: TypeForwardedTo(typeof(UnmanagedFunctionPointerAttribute))] [assembly: TypeForwardedTo(typeof(UnmanagedType))] [assembly: TypeForwardedTo(typeof(VarEnum))] [assembly: TypeForwardedTo(typeof(VariantWrapper))]
BepInEx/plugins/Broheim-SileroTTS/System.Diagnostics.StackTrace.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Diagnostics.StackTrace")] [assembly: AssemblyDescription("System.Diagnostics.StackTrace")] [assembly: AssemblyDefaultAlias("System.Diagnostics.StackTrace")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.4.0")] [assembly: TypeForwardedTo(typeof(StackFrame))] [assembly: TypeForwardedTo(typeof(StackFrameExtensions))] [assembly: TypeForwardedTo(typeof(StackTrace))]
BepInEx/plugins/Broheim-SileroTTS/System.IO.MemoryMappedFiles.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.IO.MemoryMappedFiles; using System.Reflection; using System.Runtime.CompilerServices; using Microsoft.Win32.SafeHandles; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.IO.MemoryMappedFiles")] [assembly: AssemblyDescription("System.IO.MemoryMappedFiles")] [assembly: AssemblyDefaultAlias("System.IO.MemoryMappedFiles")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(SafeMemoryMappedFileHandle))] [assembly: TypeForwardedTo(typeof(SafeMemoryMappedViewHandle))] [assembly: TypeForwardedTo(typeof(MemoryMappedFile))] [assembly: TypeForwardedTo(typeof(MemoryMappedFileAccess))] [assembly: TypeForwardedTo(typeof(MemoryMappedFileOptions))] [assembly: TypeForwardedTo(typeof(MemoryMappedFileRights))] [assembly: TypeForwardedTo(typeof(MemoryMappedViewAccessor))] [assembly: TypeForwardedTo(typeof(MemoryMappedViewStream))]
BepInEx/plugins/Broheim-SileroTTS/System.Linq.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Linq")] [assembly: AssemblyDescription("System.Linq")] [assembly: AssemblyDefaultAlias("System.Linq")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(Enumerable))] [assembly: TypeForwardedTo(typeof(IGrouping<, >))] [assembly: TypeForwardedTo(typeof(ILookup<, >))] [assembly: TypeForwardedTo(typeof(IOrderedEnumerable<>))] [assembly: TypeForwardedTo(typeof(Lookup<, >))]
BepInEx/plugins/Broheim-SileroTTS/System.Text.RegularExpressions.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Text.RegularExpressions; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Text.RegularExpressions")] [assembly: AssemblyDescription("System.Text.RegularExpressions")] [assembly: AssemblyDefaultAlias("System.Text.RegularExpressions")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.1.0")] [assembly: TypeForwardedTo(typeof(Capture))] [assembly: TypeForwardedTo(typeof(CaptureCollection))] [assembly: TypeForwardedTo(typeof(Group))] [assembly: TypeForwardedTo(typeof(GroupCollection))] [assembly: TypeForwardedTo(typeof(Match))] [assembly: TypeForwardedTo(typeof(MatchCollection))] [assembly: TypeForwardedTo(typeof(MatchEvaluator))] [assembly: TypeForwardedTo(typeof(Regex))] [assembly: TypeForwardedTo(typeof(RegexMatchTimeoutException))] [assembly: TypeForwardedTo(typeof(RegexOptions))] [assembly: TypeForwardedTo(typeof(RegexRunner))] [assembly: TypeForwardedTo(typeof(RegexRunnerFactory))]
BepInEx/plugins/Broheim-SileroTTS/System.Diagnostics.TextWriterTraceListener.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Diagnostics.TextWriterTraceListener")] [assembly: AssemblyDescription("System.Diagnostics.TextWriterTraceListener")] [assembly: AssemblyDefaultAlias("System.Diagnostics.TextWriterTraceListener")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(DelimitedListTraceListener))] [assembly: TypeForwardedTo(typeof(TextWriterTraceListener))]
BepInEx/plugins/Broheim-SileroTTS/System.Runtime.Serialization.Xml.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Xml; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Runtime.Serialization.Xml")] [assembly: AssemblyDescription("System.Runtime.Serialization.Xml")] [assembly: AssemblyDefaultAlias("System.Runtime.Serialization.Xml")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.3.0")] [assembly: TypeForwardedTo(typeof(DataContractResolver))] [assembly: TypeForwardedTo(typeof(DataContractSerializer))] [assembly: TypeForwardedTo(typeof(DataContractSerializerExtensions))] [assembly: TypeForwardedTo(typeof(DataContractSerializerSettings))] [assembly: TypeForwardedTo(typeof(InvalidDataContractException))] [assembly: TypeForwardedTo(typeof(XmlObjectSerializer))] [assembly: TypeForwardedTo(typeof(IXmlDictionary))] [assembly: TypeForwardedTo(typeof(OnXmlDictionaryReaderClose))] [assembly: TypeForwardedTo(typeof(UniqueId))] [assembly: TypeForwardedTo(typeof(XmlBinaryReaderSession))] [assembly: TypeForwardedTo(typeof(XmlBinaryWriterSession))] [assembly: TypeForwardedTo(typeof(XmlDictionary))] [assembly: TypeForwardedTo(typeof(XmlDictionaryReader))] [assembly: TypeForwardedTo(typeof(XmlDictionaryReaderQuotas))] [assembly: TypeForwardedTo(typeof(XmlDictionaryReaderQuotaTypes))] [assembly: TypeForwardedTo(typeof(XmlDictionaryString))] [assembly: TypeForwardedTo(typeof(XmlDictionaryWriter))]
BepInEx/plugins/Broheim-SileroTTS/System.Dynamic.Runtime.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Dynamic; using System.Linq.Expressions; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Dynamic.Runtime")] [assembly: AssemblyDescription("System.Dynamic.Runtime")] [assembly: AssemblyDefaultAlias("System.Dynamic.Runtime")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(BinaryOperationBinder))] [assembly: TypeForwardedTo(typeof(BindingRestrictions))] [assembly: TypeForwardedTo(typeof(CallInfo))] [assembly: TypeForwardedTo(typeof(ConvertBinder))] [assembly: TypeForwardedTo(typeof(CreateInstanceBinder))] [assembly: TypeForwardedTo(typeof(DeleteIndexBinder))] [assembly: TypeForwardedTo(typeof(DeleteMemberBinder))] [assembly: TypeForwardedTo(typeof(DynamicMetaObject))] [assembly: TypeForwardedTo(typeof(DynamicMetaObjectBinder))] [assembly: TypeForwardedTo(typeof(DynamicObject))] [assembly: TypeForwardedTo(typeof(ExpandoObject))] [assembly: TypeForwardedTo(typeof(GetIndexBinder))] [assembly: TypeForwardedTo(typeof(GetMemberBinder))] [assembly: TypeForwardedTo(typeof(IDynamicMetaObjectProvider))] [assembly: TypeForwardedTo(typeof(IInvokeOnGetBinder))] [assembly: TypeForwardedTo(typeof(InvokeBinder))] [assembly: TypeForwardedTo(typeof(InvokeMemberBinder))] [assembly: TypeForwardedTo(typeof(SetIndexBinder))] [assembly: TypeForwardedTo(typeof(SetMemberBinder))] [assembly: TypeForwardedTo(typeof(UnaryOperationBinder))] [assembly: TypeForwardedTo(typeof(DynamicExpression))] [assembly: TypeForwardedTo(typeof(DynamicExpressionVisitor))] [assembly: TypeForwardedTo(typeof(CallSite))] [assembly: TypeForwardedTo(typeof(CallSite<>))] [assembly: TypeForwardedTo(typeof(CallSiteBinder))] [assembly: TypeForwardedTo(typeof(CallSiteHelpers))] [assembly: TypeForwardedTo(typeof(ConditionalWeakTable<, >))] [assembly: TypeForwardedTo(typeof(DynamicAttribute))]
BepInEx/plugins/Broheim-SileroTTS/System.IO.FileSystem.Primitives.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.IO.FileSystem.Primitives")] [assembly: AssemblyDescription("System.IO.FileSystem.Primitives")] [assembly: AssemblyDefaultAlias("System.IO.FileSystem.Primitives")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.3.0")] [assembly: TypeForwardedTo(typeof(FileAccess))] [assembly: TypeForwardedTo(typeof(FileAttributes))] [assembly: TypeForwardedTo(typeof(FileMode))] [assembly: TypeForwardedTo(typeof(FileShare))]
BepInEx/plugins/Broheim-SileroTTS/System.IO.FileSystem.Watcher.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.IO.FileSystem.Watcher")] [assembly: AssemblyDescription("System.IO.FileSystem.Watcher")] [assembly: AssemblyDefaultAlias("System.IO.FileSystem.Watcher")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(ErrorEventArgs))] [assembly: TypeForwardedTo(typeof(ErrorEventHandler))] [assembly: TypeForwardedTo(typeof(FileSystemEventArgs))] [assembly: TypeForwardedTo(typeof(FileSystemEventHandler))] [assembly: TypeForwardedTo(typeof(FileSystemWatcher))] [assembly: TypeForwardedTo(typeof(NotifyFilters))] [assembly: TypeForwardedTo(typeof(RenamedEventArgs))] [assembly: TypeForwardedTo(typeof(RenamedEventHandler))] [assembly: TypeForwardedTo(typeof(WaitForChangedResult))] [assembly: TypeForwardedTo(typeof(WatcherChangeTypes))]
BepInEx/plugins/Broheim-SileroTTS/System.Reflection.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Reflection")] [assembly: AssemblyDescription("System.Reflection")] [assembly: AssemblyDefaultAlias("System.Reflection")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(AmbiguousMatchException))] [assembly: TypeForwardedTo(typeof(Assembly))] [assembly: TypeForwardedTo(typeof(AssemblyContentType))] [assembly: TypeForwardedTo(typeof(AssemblyName))] [assembly: TypeForwardedTo(typeof(BindingFlags))] [assembly: TypeForwardedTo(typeof(ConstructorInfo))] [assembly: TypeForwardedTo(typeof(CustomAttributeData))] [assembly: TypeForwardedTo(typeof(CustomAttributeNamedArgument))] [assembly: TypeForwardedTo(typeof(CustomAttributeTypedArgument))] [assembly: TypeForwardedTo(typeof(EventInfo))] [assembly: TypeForwardedTo(typeof(FieldInfo))] [assembly: TypeForwardedTo(typeof(ICustomAttributeProvider))] [assembly: TypeForwardedTo(typeof(IntrospectionExtensions))] [assembly: TypeForwardedTo(typeof(InvalidFilterCriteriaException))] [assembly: TypeForwardedTo(typeof(IReflectableType))] [assembly: TypeForwardedTo(typeof(LocalVariableInfo))] [assembly: TypeForwardedTo(typeof(ManifestResourceInfo))] [assembly: TypeForwardedTo(typeof(MemberFilter))] [assembly: TypeForwardedTo(typeof(MemberInfo))] [assembly: TypeForwardedTo(typeof(MemberTypes))] [assembly: TypeForwardedTo(typeof(MethodBase))] [assembly: TypeForwardedTo(typeof(MethodInfo))] [assembly: TypeForwardedTo(typeof(Module))] [assembly: TypeForwardedTo(typeof(ParameterInfo))] [assembly: TypeForwardedTo(typeof(ParameterModifier))] [assembly: TypeForwardedTo(typeof(PropertyInfo))] [assembly: TypeForwardedTo(typeof(ReflectionContext))] [assembly: TypeForwardedTo(typeof(ReflectionTypeLoadException))] [assembly: TypeForwardedTo(typeof(ResourceLocation))] [assembly: TypeForwardedTo(typeof(TargetException))] [assembly: TypeForwardedTo(typeof(TargetInvocationException))] [assembly: TypeForwardedTo(typeof(TargetParameterCountException))] [assembly: TypeForwardedTo(typeof(TypeFilter))] [assembly: TypeForwardedTo(typeof(TypeInfo))]
BepInEx/plugins/Broheim-SileroTTS/System.Runtime.dll
Decompiled 2 days agousing System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Reflection; using System.Runtime; using System.Runtime.CompilerServices; using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Text; using System.Threading; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(/*Could not decode attribute arguments.*/)] [assembly: AssemblyTitle("System.Runtime")] [assembly: AssemblyDescription("System.Runtime")] [assembly: AssemblyDefaultAlias("System.Runtime")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(Action))] [assembly: TypeForwardedTo(typeof(Action<>))] [assembly: TypeForwardedTo(typeof(Action<, , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Action<, , , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Action<, , , , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Action<, , , , , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Action<, , , , , , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Action<, , , , , , , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Action<, , , , , , , , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Action<, >))] [assembly: TypeForwardedTo(typeof(Action<, , >))] [assembly: TypeForwardedTo(typeof(Action<, , , >))] [assembly: TypeForwardedTo(typeof(Action<, , , , >))] [assembly: TypeForwardedTo(typeof(Action<, , , , , >))] [assembly: TypeForwardedTo(typeof(Action<, , , , , , >))] [assembly: TypeForwardedTo(typeof(Action<, , , , , , , >))] [assembly: TypeForwardedTo(typeof(Action<, , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Activator))] [assembly: TypeForwardedTo(typeof(ArgumentException))] [assembly: TypeForwardedTo(typeof(ArgumentNullException))] [assembly: TypeForwardedTo(typeof(ArgumentOutOfRangeException))] [assembly: TypeForwardedTo(typeof(ArithmeticException))] [assembly: TypeForwardedTo(typeof(Array))] [assembly: TypeForwardedTo(typeof(ArraySegment<>))] [assembly: TypeForwardedTo(typeof(ArrayTypeMismatchException))] [assembly: TypeForwardedTo(typeof(AsyncCallback))] [assembly: TypeForwardedTo(typeof(Attribute))] [assembly: TypeForwardedTo(typeof(AttributeTargets))] [assembly: TypeForwardedTo(typeof(AttributeUsageAttribute))] [assembly: TypeForwardedTo(typeof(BadImageFormatException))] [assembly: TypeForwardedTo(typeof(Boolean))] [assembly: TypeForwardedTo(typeof(Buffer))] [assembly: TypeForwardedTo(typeof(Byte))] [assembly: TypeForwardedTo(typeof(Char))] [assembly: TypeForwardedTo(typeof(CLSCompliantAttribute))] [assembly: TypeForwardedTo(typeof(DictionaryEntry))] [assembly: TypeForwardedTo(typeof(ICollection<>))] [assembly: TypeForwardedTo(typeof(IComparer<>))] [assembly: TypeForwardedTo(typeof(IDictionary<, >))] [assembly: TypeForwardedTo(typeof(IEnumerable<>))] [assembly: TypeForwardedTo(typeof(IEnumerator<>))] [assembly: TypeForwardedTo(typeof(IEqualityComparer<>))] [assembly: TypeForwardedTo(typeof(IList<>))] [assembly: TypeForwardedTo(typeof(IReadOnlyCollection<>))] [assembly: TypeForwardedTo(typeof(IReadOnlyDictionary<, >))] [assembly: TypeForwardedTo(typeof(IReadOnlyList<>))] [assembly: TypeForwardedTo(typeof(ISet<>))] [assembly: TypeForwardedTo(typeof(KeyNotFoundException))] [assembly: TypeForwardedTo(typeof(KeyValuePair<, >))] [assembly: TypeForwardedTo(typeof(ICollection))] [assembly: TypeForwardedTo(typeof(IComparer))] [assembly: TypeForwardedTo(typeof(IDictionary))] [assembly: TypeForwardedTo(typeof(IDictionaryEnumerator))] [assembly: TypeForwardedTo(typeof(IEnumerable))] [assembly: TypeForwardedTo(typeof(IEnumerator))] [assembly: TypeForwardedTo(typeof(IEqualityComparer))] [assembly: TypeForwardedTo(typeof(IList))] [assembly: TypeForwardedTo(typeof(IStructuralComparable))] [assembly: TypeForwardedTo(typeof(IStructuralEquatable))] [assembly: TypeForwardedTo(typeof(Collection<>))] [assembly: TypeForwardedTo(typeof(ReadOnlyCollection<>))] [assembly: TypeForwardedTo(typeof(Comparison<>))] [assembly: TypeForwardedTo(typeof(DefaultValueAttribute))] [assembly: TypeForwardedTo(typeof(EditorBrowsableAttribute))] [assembly: TypeForwardedTo(typeof(EditorBrowsableState))] [assembly: TypeForwardedTo(typeof(DateTime))] [assembly: TypeForwardedTo(typeof(DateTimeKind))] [assembly: TypeForwardedTo(typeof(DateTimeOffset))] [assembly: TypeForwardedTo(typeof(DayOfWeek))] [assembly: TypeForwardedTo(typeof(Decimal))] [assembly: TypeForwardedTo(typeof(Delegate))] [assembly: TypeForwardedTo(typeof(ConditionalAttribute))] [assembly: TypeForwardedTo(typeof(DebuggableAttribute))] [assembly: TypeForwardedTo(typeof(DivideByZeroException))] [assembly: TypeForwardedTo(typeof(Double))] [assembly: TypeForwardedTo(typeof(Enum))] [assembly: TypeForwardedTo(typeof(EventArgs))] [assembly: TypeForwardedTo(typeof(EventHandler))] [assembly: TypeForwardedTo(typeof(EventHandler<>))] [assembly: TypeForwardedTo(typeof(Exception))] [assembly: TypeForwardedTo(typeof(FieldAccessException))] [assembly: TypeForwardedTo(typeof(FlagsAttribute))] [assembly: TypeForwardedTo(typeof(FormatException))] [assembly: TypeForwardedTo(typeof(FormattableString))] [assembly: TypeForwardedTo(typeof(Func<>))] [assembly: TypeForwardedTo(typeof(Func<, , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Func<, , , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Func<, , , , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Func<, , , , , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Func<, , , , , , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Func<, , , , , , , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Func<, , , , , , , , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Func<, , , , , , , , , , , , , , , , >))] [assembly: TypeForwardedTo(typeof(Func<, >))] [assembly: TypeForwardedTo(typeof(Func<, , >))] [assembly: TypeForwardedTo(typeof(Func<, , , >))] [assembly: TypeForwardedTo(typeof(Func<, , , , >))] [assembly: TypeForwardedTo(typeof(Func<, , , , , >))] [assembly: TypeForwardedTo(typeof(Func<, , , , , , >))] [assembly: TypeForwardedTo(typeof(Func<, , , , , , , >))] [assembly: TypeForwardedTo(typeof(Func<, , , , , , , , >))] [assembly: TypeForwardedTo(typeof(GC))] [assembly: TypeForwardedTo(typeof(GCCollectionMode))] [assembly: TypeForwardedTo(typeof(DateTimeStyles))] [assembly: TypeForwardedTo(typeof(NumberStyles))] [assembly: TypeForwardedTo(typeof(TimeSpanStyles))] [assembly: TypeForwardedTo(typeof(Guid))] [assembly: TypeForwardedTo(typeof(IAsyncResult))] [assembly: TypeForwardedTo(typeof(IComparable))] [assembly: TypeForwardedTo(typeof(IComparable<>))] [assembly: TypeForwardedTo(typeof(IConvertible))] [assembly: TypeForwardedTo(typeof(ICustomFormatter))] [assembly: TypeForwardedTo(typeof(IDisposable))] [assembly: TypeForwardedTo(typeof(IEquatable<>))] [assembly: TypeForwardedTo(typeof(IFormatProvider))] [assembly: TypeForwardedTo(typeof(IFormattable))] [assembly: TypeForwardedTo(typeof(IndexOutOfRangeException))] [assembly: TypeForwardedTo(typeof(InsufficientExecutionStackException))] [assembly: TypeForwardedTo(typeof(Int16))] [assembly: TypeForwardedTo(typeof(Int32))] [assembly: TypeForwardedTo(typeof(Int64))] [assembly: TypeForwardedTo(typeof(IntPtr))] [assembly: TypeForwardedTo(typeof(InvalidCastException))] [assembly: TypeForwardedTo(typeof(InvalidOperationException))] [assembly: TypeForwardedTo(typeof(InvalidProgramException))] [assembly: TypeForwardedTo(typeof(InvalidTimeZoneException))] [assembly: TypeForwardedTo(typeof(DirectoryNotFoundException))] [assembly: TypeForwardedTo(typeof(FileLoadException))] [assembly: TypeForwardedTo(typeof(FileNotFoundException))] [assembly: TypeForwardedTo(typeof(IOException))] [assembly: TypeForwardedTo(typeof(PathTooLongException))] [assembly: TypeForwardedTo(typeof(IObservable<>))] [assembly: TypeForwardedTo(typeof(IObserver<>))] [assembly: TypeForwardedTo(typeof(IProgress<>))] [assembly: TypeForwardedTo(typeof(Lazy<>))] [assembly: TypeForwardedTo(typeof(Lazy<, >))] [assembly: TypeForwardedTo(typeof(MemberAccessException))] [assembly: TypeForwardedTo(typeof(MethodAccessException))] [assembly: TypeForwardedTo(typeof(MissingFieldException))] [assembly: TypeForwardedTo(typeof(MissingMemberException))] [assembly: TypeForwardedTo(typeof(MissingMethodException))] [assembly: TypeForwardedTo(typeof(MTAThreadAttribute))] [assembly: TypeForwardedTo(typeof(MulticastDelegate))] [assembly: TypeForwardedTo(typeof(NotImplementedException))] [assembly: TypeForwardedTo(typeof(NotSupportedException))] [assembly: TypeForwardedTo(typeof(Nullable))] [assembly: TypeForwardedTo(typeof(Nullable<>))] [assembly: TypeForwardedTo(typeof(NullReferenceException))] [assembly: TypeForwardedTo(typeof(Object))] [assembly: TypeForwardedTo(typeof(ObjectDisposedException))] [assembly: TypeForwardedTo(typeof(ObsoleteAttribute))] [assembly: TypeForwardedTo(typeof(OutOfMemoryException))] [assembly: TypeForwardedTo(typeof(OverflowException))] [assembly: TypeForwardedTo(typeof(ParamArrayAttribute))] [assembly: TypeForwardedTo(typeof(PlatformNotSupportedException))] [assembly: TypeForwardedTo(typeof(Predicate<>))] [assembly: TypeForwardedTo(typeof(RankException))] [assembly: TypeForwardedTo(typeof(AssemblyCompanyAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyConfigurationAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyCopyrightAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyCultureAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyDefaultAliasAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyDelaySignAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyDescriptionAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyFileVersionAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyFlagsAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyInformationalVersionAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyKeyFileAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyKeyNameAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyMetadataAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyNameFlags))] [assembly: TypeForwardedTo(typeof(AssemblyProductAttribute))] [assembly: TypeForwardedTo(typeof(AssemblySignatureKeyAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyTitleAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyTrademarkAttribute))] [assembly: TypeForwardedTo(typeof(AssemblyVersionAttribute))] [assembly: TypeForwardedTo(typeof(DefaultMemberAttribute))] [assembly: TypeForwardedTo(typeof(ProcessorArchitecture))] [assembly: TypeForwardedTo(typeof(AccessedThroughPropertyAttribute))] [assembly: TypeForwardedTo(typeof(AsyncStateMachineAttribute))] [assembly: TypeForwardedTo(typeof(CallerFilePathAttribute))] [assembly: TypeForwardedTo(typeof(CallerLineNumberAttribute))] [assembly: TypeForwardedTo(typeof(CallerMemberNameAttribute))] [assembly: TypeForwardedTo(typeof(CompilationRelaxationsAttribute))] [assembly: TypeForwardedTo(typeof(CompilerGeneratedAttribute))] [assembly: TypeForwardedTo(typeof(ConditionalWeakTable<, >))] [assembly: TypeForwardedTo(typeof(CustomConstantAttribute))] [assembly: TypeForwardedTo(typeof(DateTimeConstantAttribute))] [assembly: TypeForwardedTo(typeof(DecimalConstantAttribute))] [assembly: TypeForwardedTo(typeof(DisablePrivateReflectionAttribute))] [assembly: TypeForwardedTo(typeof(ExtensionAttribute))] [assembly: TypeForwardedTo(typeof(FixedBufferAttribute))] [assembly: TypeForwardedTo(typeof(FormattableStringFactory))] [assembly: TypeForwardedTo(typeof(IndexerNameAttribute))] [assembly: TypeForwardedTo(typeof(InternalsVisibleToAttribute))] [assembly: TypeForwardedTo(typeof(IsConst))] [assembly: TypeForwardedTo(typeof(IStrongBox))] [assembly: TypeForwardedTo(typeof(IsVolatile))] [assembly: TypeForwardedTo(typeof(IteratorStateMachineAttribute))] [assembly: TypeForwardedTo(typeof(MethodImplAttribute))] [assembly: TypeForwardedTo(typeof(MethodImplOptions))] [assembly: TypeForwardedTo(typeof(ReferenceAssemblyAttribute))] [assembly: TypeForwardedTo(typeof(RuntimeCompatibilityAttribute))] [assembly: TypeForwardedTo(typeof(RuntimeHelpers))] [assembly: TypeForwardedTo(typeof(StateMachineAttribute))] [assembly: TypeForwardedTo(typeof(StrongBox<>))] [assembly: TypeForwardedTo(typeof(TypeForwardedFromAttribute))] [assembly: TypeForwardedTo(typeof(TypeForwardedToAttribute))] [assembly: TypeForwardedTo(typeof(UnsafeValueTypeAttribute))] [assembly: TypeForwardedTo(typeof(ExceptionDispatchInfo))] [assembly: TypeForwardedTo(typeof(GCLargeObjectHeapCompactionMode))] [assembly: TypeForwardedTo(typeof(GCLatencyMode))] [assembly: TypeForwardedTo(typeof(GCSettings))] [assembly: TypeForwardedTo(typeof(CharSet))] [assembly: TypeForwardedTo(typeof(ComVisibleAttribute))] [assembly: TypeForwardedTo(typeof(FieldOffsetAttribute))] [assembly: TypeForwardedTo(typeof(LayoutKind))] [assembly: TypeForwardedTo(typeof(OutAttribute))] [assembly: TypeForwardedTo(typeof(StructLayoutAttribute))] [assembly: TypeForwardedTo(typeof(TargetFrameworkAttribute))] [assembly: TypeForwardedTo(typeof(RuntimeFieldHandle))] [assembly: TypeForwardedTo(typeof(RuntimeMethodHandle))] [assembly: TypeForwardedTo(typeof(RuntimeTypeHandle))] [assembly: TypeForwardedTo(typeof(SByte))] [assembly: TypeForwardedTo(typeof(AllowPartiallyTrustedCallersAttribute))] [assembly: TypeForwardedTo(typeof(SecurityCriticalAttribute))] [assembly: TypeForwardedTo(typeof(SecurityException))] [assembly: TypeForwardedTo(typeof(SecuritySafeCriticalAttribute))] [assembly: TypeForwardedTo(typeof(SecurityTransparentAttribute))] [assembly: TypeForwardedTo(typeof(VerificationException))] [assembly: TypeForwardedTo(typeof(Single))] [assembly: TypeForwardedTo(typeof(STAThreadAttribute))] [assembly: TypeForwardedTo(typeof(String))] [assembly: TypeForwardedTo(typeof(StringComparison))] [assembly: TypeForwardedTo(typeof(StringSplitOptions))] [assembly: TypeForwardedTo(typeof(StringBuilder))] [assembly: TypeForwardedTo(typeof(LazyThreadSafetyMode))] [assembly: TypeForwardedTo(typeof(Timeout))] [assembly: TypeForwardedTo(typeof(WaitHandle))] [assembly: TypeForwardedTo(typeof(ThreadStaticAttribute))] [assembly: TypeForwardedTo(typeof(TimeoutException))] [assembly: TypeForwardedTo(typeof(TimeSpan))] [assembly: TypeForwardedTo(typeof(TimeZoneInfo))] [assembly: TypeForwardedTo(typeof(Tuple))] [assembly: TypeForwardedTo(typeof(Tuple<>))] [assembly: TypeForwardedTo(typeof(Tuple<, >))] [assembly: TypeForwardedTo(typeof(Tuple<, , >))] [assembly: TypeForwardedTo(typeof(Tuple<, , , >))] [assembly: TypeForwardedTo(typeof(Tuple<, , , , >))] [assembly: TypeForwardedTo(typeof(Tuple<, , , , , >))] [assembly: TypeForwardedTo(typeof(Tuple<, , , , , , >))] [assembly: TypeForwardedTo(typeof(Tuple<, , , , , , , >))] [assembly: TypeForwardedTo(typeof(Type))] [assembly: TypeForwardedTo(typeof(TypeAccessException))] [assembly: TypeForwardedTo(typeof(TypeCode))] [assembly: TypeForwardedTo(typeof(TypeInitializationException))] [assembly: TypeForwardedTo(typeof(TypeLoadException))] [assembly: TypeForwardedTo(typeof(UInt16))] [assembly: TypeForwardedTo(typeof(UInt32))] [assembly: TypeForwardedTo(typeof(UInt64))] [assembly: TypeForwardedTo(typeof(UIntPtr))] [assembly: TypeForwardedTo(typeof(UnauthorizedAccessException))] [assembly: TypeForwardedTo(typeof(Uri))] [assembly: TypeForwardedTo(typeof(UriComponents))] [assembly: TypeForwardedTo(typeof(UriFormat))] [assembly: TypeForwardedTo(typeof(UriFormatException))] [assembly: TypeForwardedTo(typeof(UriHostNameType))] [assembly: TypeForwardedTo(typeof(UriKind))] [assembly: TypeForwardedTo(typeof(ValueType))] [assembly: TypeForwardedTo(typeof(Version))] [assembly: TypeForwardedTo(typeof(Void))] [assembly: TypeForwardedTo(typeof(WeakReference))] [assembly: TypeForwardedTo(typeof(WeakReference<>))]
BepInEx/plugins/Broheim-SileroTTS/System.Net.Sockets.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Net.Sockets; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Net.Sockets")] [assembly: AssemblyDescription("System.Net.Sockets")] [assembly: AssemblyDefaultAlias("System.Net.Sockets")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.2.0")] [assembly: TypeForwardedTo(typeof(IOControlCode))] [assembly: TypeForwardedTo(typeof(IPPacketInformation))] [assembly: TypeForwardedTo(typeof(IPProtectionLevel))] [assembly: TypeForwardedTo(typeof(IPv6MulticastOption))] [assembly: TypeForwardedTo(typeof(LingerOption))] [assembly: TypeForwardedTo(typeof(MulticastOption))] [assembly: TypeForwardedTo(typeof(NetworkStream))] [assembly: TypeForwardedTo(typeof(ProtocolType))] [assembly: TypeForwardedTo(typeof(SelectMode))] [assembly: TypeForwardedTo(typeof(SendPacketsElement))] [assembly: TypeForwardedTo(typeof(Socket))] [assembly: TypeForwardedTo(typeof(SocketAsyncEventArgs))] [assembly: TypeForwardedTo(typeof(SocketAsyncOperation))] [assembly: TypeForwardedTo(typeof(SocketFlags))] [assembly: TypeForwardedTo(typeof(SocketOptionLevel))] [assembly: TypeForwardedTo(typeof(SocketOptionName))] [assembly: TypeForwardedTo(typeof(SocketReceiveFromResult))] [assembly: TypeForwardedTo(typeof(SocketReceiveMessageFromResult))] [assembly: TypeForwardedTo(typeof(SocketShutdown))] [assembly: TypeForwardedTo(typeof(SocketTaskExtensions))] [assembly: TypeForwardedTo(typeof(SocketType))] [assembly: TypeForwardedTo(typeof(TcpClient))] [assembly: TypeForwardedTo(typeof(TcpListener))] [assembly: TypeForwardedTo(typeof(UdpClient))] [assembly: TypeForwardedTo(typeof(UdpReceiveResult))]
BepInEx/plugins/Broheim-SileroTTS/System.Xml.XPath.XDocument.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Xml.XPath; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Xml.XPath.XDocument")] [assembly: AssemblyDescription("System.Xml.XPath.XDocument")] [assembly: AssemblyDefaultAlias("System.Xml.XPath.XDocument")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.3.0")] [assembly: TypeForwardedTo(typeof(Extensions))] [assembly: TypeForwardedTo(typeof(XDocumentExtensions))]
BepInEx/plugins/Broheim-SileroTTS/System.Net.WebHeaderCollection.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Net; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Net.WebHeaderCollection")] [assembly: AssemblyDescription("System.Net.WebHeaderCollection")] [assembly: AssemblyDefaultAlias("System.Net.WebHeaderCollection")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.1.0")] [assembly: TypeForwardedTo(typeof(HttpRequestHeader))] [assembly: TypeForwardedTo(typeof(HttpResponseHeader))] [assembly: TypeForwardedTo(typeof(WebHeaderCollection))]
BepInEx/plugins/Broheim-SileroTTS/System.Resources.Reader.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Resources.Reader")] [assembly: AssemblyDescription("System.Resources.Reader")] [assembly: AssemblyDefaultAlias("System.Resources.Reader")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.2.0")] [assembly: TypeForwardedTo(typeof(ResourceReader))]
BepInEx/plugins/Broheim-SileroTTS/System.Xml.ReaderWriter.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Xml.ReaderWriter")] [assembly: AssemblyDescription("System.Xml.ReaderWriter")] [assembly: AssemblyDefaultAlias("System.Xml.ReaderWriter")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.1.1.0")] [assembly: TypeForwardedTo(typeof(ConformanceLevel))] [assembly: TypeForwardedTo(typeof(DtdProcessing))] [assembly: TypeForwardedTo(typeof(IXmlLineInfo))] [assembly: TypeForwardedTo(typeof(IXmlNamespaceResolver))] [assembly: TypeForwardedTo(typeof(NamespaceHandling))] [assembly: TypeForwardedTo(typeof(NameTable))] [assembly: TypeForwardedTo(typeof(NewLineHandling))] [assembly: TypeForwardedTo(typeof(ReadState))] [assembly: TypeForwardedTo(typeof(XmlSchema))] [assembly: TypeForwardedTo(typeof(XmlSchemaForm))] [assembly: TypeForwardedTo(typeof(IXmlSerializable))] [assembly: TypeForwardedTo(typeof(XmlSchemaProviderAttribute))] [assembly: TypeForwardedTo(typeof(WriteState))] [assembly: TypeForwardedTo(typeof(XmlConvert))] [assembly: TypeForwardedTo(typeof(XmlDateTimeSerializationMode))] [assembly: TypeForwardedTo(typeof(XmlException))] [assembly: TypeForwardedTo(typeof(XmlNamespaceManager))] [assembly: TypeForwardedTo(typeof(XmlNamespaceScope))] [assembly: TypeForwardedTo(typeof(XmlNameTable))] [assembly: TypeForwardedTo(typeof(XmlNodeType))] [assembly: TypeForwardedTo(typeof(XmlParserContext))] [assembly: TypeForwardedTo(typeof(XmlQualifiedName))] [assembly: TypeForwardedTo(typeof(XmlReader))] [assembly: TypeForwardedTo(typeof(XmlReaderSettings))] [assembly: TypeForwardedTo(typeof(XmlSpace))] [assembly: TypeForwardedTo(typeof(XmlWriter))] [assembly: TypeForwardedTo(typeof(XmlWriterSettings))]
BepInEx/plugins/Broheim-SileroTTS/System.Diagnostics.Debug.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Diagnostics.Debug")] [assembly: AssemblyDescription("System.Diagnostics.Debug")] [assembly: AssemblyDefaultAlias("System.Diagnostics.Debug")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(Debug))] [assembly: TypeForwardedTo(typeof(Debugger))] [assembly: TypeForwardedTo(typeof(DebuggerBrowsableAttribute))] [assembly: TypeForwardedTo(typeof(DebuggerBrowsableState))] [assembly: TypeForwardedTo(typeof(DebuggerDisplayAttribute))] [assembly: TypeForwardedTo(typeof(DebuggerHiddenAttribute))] [assembly: TypeForwardedTo(typeof(DebuggerNonUserCodeAttribute))] [assembly: TypeForwardedTo(typeof(DebuggerStepThroughAttribute))] [assembly: TypeForwardedTo(typeof(DebuggerTypeProxyAttribute))]
BepInEx/plugins/Broheim-SileroTTS/System.Xml.XmlSerializer.dll
Decompiled 2 days agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Xml.Serialization; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("System.Xml.XmlSerializer")] [assembly: AssemblyDescription("System.Xml.XmlSerializer")] [assembly: AssemblyDefaultAlias("System.Xml.XmlSerializer")] [assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyProduct("Microsoft® .NET Framework")] [assembly: AssemblyCopyright(".NET Foundation and Contributors")] [assembly: AssemblyFileVersion("4.6.26419.02")] [assembly: AssemblyInformationalVersion("4.6.26419.02 @BuiltBy: dlab-DDVSOWINAGE001 @Branch: HEAD @Commit: 18a36291e48808fa7ef2d00a764ceb1ec95645a5")] [assembly: CLSCompliant(true)] [assembly: AssemblyMetadata("", "")] [assembly: AssemblyVersion("4.0.11.0")] [assembly: TypeForwardedTo(typeof(IXmlSerializable))] [assembly: TypeForwardedTo(typeof(XmlAnyAttributeAttribute))] [assembly: TypeForwardedTo(typeof(XmlAnyElementAttribute))] [assembly: TypeForwardedTo(typeof(XmlAnyElementAttributes))] [assembly: TypeForwardedTo(typeof(XmlArrayAttribute))] [assembly: TypeForwardedTo(typeof(XmlArrayItemAttribute))] [assembly: TypeForwardedTo(typeof(XmlArrayItemAttributes))] [assembly: TypeForwardedTo(typeof(XmlAttributeAttribute))] [assembly: TypeForwardedTo(typeof(XmlAttributeOverrides))] [assembly: TypeForwardedTo(typeof(XmlAttributes))] [assembly: TypeForwardedTo(typeof(XmlChoiceIdentifierAttribute))] [assembly: TypeForwardedTo(typeof(XmlElementAttribute))] [assembly: TypeForwardedTo(typeof(XmlElementAttributes))] [assembly: TypeForwardedTo(typeof(XmlEnumAttribute))] [assembly: TypeForwardedTo(typeof(XmlIgnoreAttribute))] [assembly: TypeForwardedTo(typeof(XmlIncludeAttribute))] [assembly: TypeForwardedTo(typeof(XmlNamespaceDeclarationsAttribute))] [assembly: TypeForwardedTo(typeof(XmlRootAttribute))] [assembly: TypeForwardedTo(typeof(XmlSchemaProviderAttribute))] [assembly: TypeForwardedTo(typeof(XmlSerializer))] [assembly: TypeForwardedTo(typeof(XmlSerializerNamespaces))] [assembly: TypeForwardedTo(typeof(XmlTextAttribute))] [assembly: TypeForwardedTo(typeof(XmlTypeAttribute))]